StorelessUnivariateStatistic
org.apache.commons.math3.stat.descriptive

Interface StorelessUnivariateStatistic

    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      voidclear()
      Clears the internal state of the Statistic
      StorelessUnivariateStatisticcopy()
      Returns a copy of the statistic with the same internal state.
      longgetN()
      Returns the number of values that have been added.
      doublegetResult()
      Returns the current value of the Statistic.
      voidincrement(double d)
      Updates the internal state of the statistic to reflect the addition of the new value.
      voidincrementAll(double[] values)
      Updates the internal state of the statistic to reflect addition of all values in the values array.
      voidincrementAll(double[] values, int start, int length)
      Updates the internal state of the statistic to reflect addition of the values in the designated portion of the values array.
    • Method Detail

      • increment

        void increment(double d)
        Updates the internal state of the statistic to reflect the addition of the new value.
        Parameters:
        d - the new value.
      • incrementAll

        void incrementAll(double[] values)                  throws MathIllegalArgumentException
        Updates the internal state of the statistic to reflect addition of all values in the values array. Does not clear the statistic first -- i.e., the values are added incrementally to the dataset.
        Parameters:
        values - array holding the new values to add
        Throws:
        MathIllegalArgumentException - if the array is null
      • incrementAll

        void incrementAll(double[] values,                int start,                int length)                  throws MathIllegalArgumentException
        Updates the internal state of the statistic to reflect addition of the values in the designated portion of the values array. Does not clear the statistic first -- i.e., the values are added incrementally to the dataset.
        Parameters:
        values - array holding the new values to add
        start - the array index of the first value to add
        length - the number of elements to add
        Throws:
        MathIllegalArgumentException - if the array is null or the index
      • getResult

        double getResult()
        Returns the current value of the Statistic.
        Returns:
        value of the statistic, Double.NaN if it has been cleared or just instantiated.
      • getN

        long getN()
        Returns the number of values that have been added.
        Returns:
        the number of values.
      • clear

        void clear()
        Clears the internal state of the Statistic

SCaVis 1.7 © jWork.org