|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.stat.descriptive.AbstractUnivariateStatistic
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.
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. |
protected boolean |
test(double[] values,
int begin,
int length)
This method is used by evaluate(double[], int, int) methods
to verify that the input parameters designate a subarray of positive length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractUnivariateStatistic()
Method Detail |
public double evaluate(double[] values)
UnivariateStatistic
evaluate
in interface UnivariateStatistic
values
- input array
UnivariateStatistic.evaluate(double[])
public abstract double evaluate(double[] values, int begin, int length)
UnivariateStatistic
evaluate
in interface UnivariateStatistic
values
- the input arraybegin
- the index of the first element to includelength
- the number of elements to include
UnivariateStatistic.evaluate(double[], int, int)
protected boolean test(double[] values, int begin, int length)
evaluate(double[], int, int)
methods
to verify that the input parameters designate a subarray of positive length.
true
iff the parameters designate a subarray of
positive lengthIllegalArgumentException
if the array is null or
or the indices are invalidfalse
length
is 0.
values
- the input arraybegin
- index of the first array element to includelength
- the number of elements to include
IllegalArgumentException
- if the indices are invalid or the array is null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |