org.apache.commons.math.stat.descriptive
Class AbstractUnivariateStatistic

java.lang.Object
  extended by org.apache.commons.math.stat.descriptive.AbstractUnivariateStatistic
All Implemented Interfaces:
java.io.Serializable, UnivariateStatistic
Direct Known Subclasses:
AbstractStorelessUnivariateStatistic, Percentile

public abstract class AbstractUnivariateStatistic
extends java.lang.Object
implements UnivariateStatistic, java.io.Serializable

Abstract base class for all implementations of the UnivariateStatistic interface.

Provides a default implementation of evaluate(double[]), delegating to evaluate(double[], int, int) in the natural way.

Also includes a test method that performs generic parameter validation for the evaluate methods.

See Also:
Serialized Form

Constructor Summary
AbstractUnivariateStatistic()
           
 
Method Summary
 double evaluate(double[] values)
          Returns the result of evaluating the statistic over the input array.
abstract  double evaluate(double[] values, int begin, int length)
          Returns the result of evaluating the statistic over the specified entries in the input array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUnivariateStatistic

public AbstractUnivariateStatistic()
Method Detail

evaluate

public double evaluate(double[] values)
Description copied from interface: UnivariateStatistic
Returns the result of evaluating the statistic over the input array.

Specified by:
evaluate in interface UnivariateStatistic
Parameters:
values - input array
Returns:
the value of the statistic applied to the input array
See Also:
UnivariateStatistic.evaluate(double[])

evaluate

public abstract double evaluate(double[] values,
                                int begin,
                                int length)
Description copied from interface: UnivariateStatistic
Returns the result of evaluating the statistic over the specified entries in the input array.

Specified by:
evaluate in interface UnivariateStatistic
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
See Also:
UnivariateStatistic.evaluate(double[], int, int)


jHepWork 1.1 (C) Chekanov