Interface UnivariateStatistic

All Superinterfaces:
MathArrays.Function
All Known Subinterfaces:
StorelessUnivariateStatistic
All Known Implementing Classes:
AbstractStorelessUnivariateStatistic, AbstractUnivariateStatistic, GeometricMean, Kurtosis, Max, Mean, Median, Min, Percentile, Product, PSquarePercentile, RandomPercentile, SecondMoment, SemiVariance, Skewness, StandardDeviation, Sum, SumOfLogs, SumOfSquares, Variance

public interface UnivariateStatistic extends MathArrays.Function
Base interface implemented by all statistics.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of the statistic with the same internal state.
    default double
    evaluate(double[] values)
    Returns the result of evaluating the statistic over the input array.
    double
    evaluate(double[] values, int begin, int length)
    Returns the result of evaluating the statistic over the specified entries in the input array.
  • Method Details

    • evaluate

      default double evaluate(double[] values) throws MathIllegalArgumentException
      Returns the result of evaluating the statistic over the input array.

      The default implementation delegates to evaluate(double[], int, int) in the natural way.

      Specified by:
      evaluate in interface MathArrays.Function
      Parameters:
      values - input array
      Returns:
      the value of the statistic applied to the input array
      Throws:
      MathIllegalArgumentException - if values is null
    • evaluate

      double evaluate(double[] values, int begin, int length) throws MathIllegalArgumentException
      Returns the result of evaluating the statistic over the specified entries in the input array.
      Specified by:
      evaluate in interface MathArrays.Function
      Parameters:
      values - the input array
      begin - the index of the first element to include
      length - the number of elements to include
      Returns:
      the value of the statistic applied to the included array entries
      Throws:
      MathIllegalArgumentException - if values is null or the indices are invalid
    • copy

      Returns a copy of the statistic with the same internal state.
      Returns:
      a copy of the statistic