Class VectorialStorelessStatistic

    • Constructor Detail

      • VectorialStorelessStatistic

        public VectorialStorelessStatistic​(int dimension,
                                           StorelessUnivariateStatistic univariateStatistic)
        Create a new VectorialStorelessStatistic with the given dimension and statistic implementation. A copy of the provided statistic will be created for each component of the vector.
        Parameters:
        dimension - the vector dimension
        univariateStatistic - the prototype statistic
        Throws:
        MathIllegalArgumentException - if dimension < 1
    • Method Detail

      • increment

        public void increment​(double[] d)
        Updates the internal state of the statistic to reflect the addition of the new value.
        Specified by:
        increment in interface StorelessMultivariateStatistic
        Parameters:
        d - the new value
      • getResult

        public double[] getResult()
        Returns the current value of the Statistic.
        Specified by:
        getResult in interface StorelessMultivariateStatistic
        Returns:
        value of the statistic, Double.NaN if it has been cleared or just instantiated.
      • getN

        public long getN()
        Returns the number of values that have been added.
        Specified by:
        getN in interface StorelessMultivariateStatistic
        Returns:
        the number of values.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object