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.
| Modifier and Type | Field and Description |
|---|---|
| private double[] | storedData
Stored data. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract UnivariateStatistic | copy()
Redeclares org. Returns a copy of the statistic with the same internal state. |
| public double | Returns: the value of the statistic applied to the stored dataReturns the result of evaluating the statistic over the stored data. |
| public double | evaluate(final double[]
input array values)Implements org. Returns the result of evaluating the statistic over the input array. |
| public abstract double | evaluate(final double[]
the input array values, final int the index of the first element to include begin, final int the number of elements to include length)Redeclares org. Returns the result of evaluating the statistic over the specified entries in the input array. |
| public double[] | |
| protected double[] | Returns: reference to the stored data array (may be null)Get a reference to the stored data array. |
| public void | setData(final double[]
data array to store (may be null to remove stored data) values)Set the data array. |
| public void | setData(final double[]
data array to store values, final int the index of the first element to include begin, final int the number of elements to include length)Set the data array. |
| protected boolean | Returns: true if the parameters are valid and designate a subarray of positive lengththe input array values, final int index of the first array element to include begin, final int the number of elements to include length)This method is used by |
| protected boolean | Returns: true if the parameters are validthe input array values, final int index of the first array element to include begin, final int the number of elements to include length, final boolean if allowEmpty)true then zero length arrays are allowedThis method is used by |
| protected boolean | Returns: true if the parameters are valid and designate a subarray of positive lengththe input array values, final double[] the weights array weights, final int index of the first array element to include begin, final int the number of elements to include length)This method is used by |
| protected boolean | Returns: true if the parameters are valid.the input array. values, final double[] the weights array. weights, final int index of the first array element to include. begin, final int the number of elements to include. length, final boolean if allowEmpty)true than allow zero length arrays to pass.This method is used by |
| storedData | back to summary |
|---|---|
| private double[] storedData Stored data. | |
| AbstractUnivariateStatistic | back to summary |
|---|---|
| public AbstractUnivariateStatistic() | |
| copy | back to summary |
|---|---|
| public abstract UnivariateStatistic copy() Redeclares org. Doc from org. Returns a copy of the statistic with the same internal state.
| |
| evaluate | back to summary |
|---|---|
| public double evaluate() throws MathIllegalArgumentException Returns the result of evaluating the statistic over the stored data.
The stored array is the one which was set by previous calls to
| |
| evaluate | back to summary |
|---|---|
| public double evaluate(final double[] values) throws MathIllegalArgumentException Implements org. Doc from org. Returns the result of evaluating the statistic over the input array.
| |
| evaluate | back to summary |
|---|---|
| public abstract double evaluate(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Redeclares org. Doc from org. Returns the result of evaluating the statistic over the specified entries in the input array.
| |
| getData | back to summary |
|---|---|
| public double[] getData() Get a copy of the stored data array.
| |
| getDataRef | back to summary |
|---|---|
| protected double[] getDataRef() Get a reference to the stored data array.
| |
| setData | back to summary |
|---|---|
| public void setData(final double[] values) Set the data array. The stored value is a copy of the parameter array, not the array itself.
| |
| setData | back to summary |
|---|---|
| public void setData(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Set the data array. The input array is copied, not referenced.
| |
| test | back to summary |
|---|---|
| protected boolean test(final double[] values, final int begin, final int length) throws MathIllegalArgumentException This method is used by
length is 0.
| |
| test | back to summary |
|---|---|
| protected boolean test(final double[] values, final int begin, final int length, final boolean allowEmpty) throws MathIllegalArgumentException This method is used by
length is 0 unless allowEmpty is true
| |
| test | back to summary |
|---|---|
| protected boolean test(final double[] values, final double[] weights, final int begin, final int length) throws MathIllegalArgumentException This method is used by
length is 0.
| |
| test | back to summary |
|---|---|
| protected boolean test(final double[] values, final double[] weights, final int begin, final int length, final boolean allowEmpty) throws MathIllegalArgumentException This method is used by
length is 0 unless allowEmpty is true.
| |