| org.apache.commons.math.stat.descriptive.AbstractStorelessUnivariateStatistic org.apache.commons.math.stat.descriptive.rank.Max
Max | public class Max extends AbstractStorelessUnivariateStatistic (Code) | | Returns the maximum of the available values.
- The result is
NaN iff all values are NaN
(i.e. NaN values have no impact on the value of the statistic).
- If any of the values equals
Double.POSITIVE_INFINITY ,
the result is Double.POSITIVE_INFINITY.
Note that this implementation is not synchronized. If
multiple threads access an instance of this class concurrently, and at least
one of the threads invokes the increment() or
clear() method, it must be synchronized externally.
version: $Revision: 348519 $ $Date: 2005-11-23 12:12:18 -0700 (Wed, 23 Nov 2005) $ |
Constructor Summary | |
public | Max() |
Method Summary | |
public void | clear() | public double | evaluate(double[] values, int begin, int length) Returns the maximum of the entries in the specified portion of
the input array, or Double.NaN if the designated subarray
is empty.
Throws IllegalArgumentException if the array is null or
the array index parameters are not valid.
- The result is
NaN iff all values are NaN
(i.e. | public long | getN() | public double | getResult() | public void | increment(double d) |
Max | public Max()(Code) | | Create a Max instance
|
evaluate | public double evaluate(double[] values, int begin, int length)(Code) | | Returns the maximum of the entries in the specified portion of
the input array, or Double.NaN if the designated subarray
is empty.
Throws IllegalArgumentException if the array is null or
the array index parameters are not valid.
- The result is
NaN iff all values are NaN
(i.e. NaN values have no impact on the value of the statistic).
- If any of the values equals
Double.POSITIVE_INFINITY ,
the result is Double.POSITIVE_INFINITY.
Parameters: values - the input array Parameters: begin - index of the first array element to include Parameters: length - the number of elements to include the maximum of the values or Double.NaN if length = 0 throws: IllegalArgumentException - if the array is null or the array indexparameters are not valid |
|
|