|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.stat.StatUtils
StatUtils provides easy static implementations of common double[] based statistical methods. These return a single result value or in some cases, as identified in the javadoc for each method, Double.NaN.
Method Summary | |
static double |
max(double[] values)
Returns the maximum of the available values |
static double |
max(double[] values,
int begin,
int length)
Returns the maximum of the available values |
static double |
mean(double[] values)
Returns the arithmetic mean of the available values |
static double |
mean(double[] values,
int begin,
int length)
Returns the arithmetic mean of the available values |
static double |
min(double[] values)
Returns the minimum of the available values |
static double |
min(double[] values,
int begin,
int length)
Returns the minimum of the available values |
static double |
percentile(double[] values,
double p)
Returns an estimate for the pth percentile of the stored values. |
static double |
percentile(double[] values,
int begin,
int length,
double p)
Returns an estimate for the pth percentile of the stored values. |
static double |
product(double[] values)
Returns the product for this collection of values |
static double |
product(double[] values,
int begin,
int length)
Returns the product for this collection of values |
static double |
sum(double[] values)
The sum of the values that have been added to Univariate. |
static double |
sum(double[] values,
int begin,
int length)
The sum of the values that have been added to Univariate. |
static double |
sumLog(double[] values)
Returns the sum of the natural logs for this collection of values |
static double |
sumLog(double[] values,
int begin,
int length)
Returns the sum of the natural logs for this collection of values |
static double |
sumSq(double[] values)
Returns the sum of the squares of the available values. |
static double |
sumSq(double[] values,
int begin,
int length)
Returns the sum of the squares of the available values. |
static double |
variance(double[] values)
Returns the variance of the available values. |
static double |
variance(double[] values,
int begin,
int length)
Returns the variance of the available values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static double sum(double[] values)
values
- Is a double[] containing the values
public static double sum(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double sumSq(double[] values)
values
- Is a double[] containing the values
public static double sumSq(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double product(double[] values)
values
- Is a double[] containing the values
public static double product(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double sumLog(double[] values)
values
- Is a double[] containing the values
public static double sumLog(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double mean(double[] values)
values
- Is a double[] containing the values
public static double mean(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double variance(double[] values)
values
- Is a double[] containing the values
public static double variance(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double max(double[] values)
values
- Is a double[] containing the values
public static double max(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double min(double[] values)
values
- Is a double[] containing the values
public static double min(double[] values, int begin, int length)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the array
public static double percentile(double[] values, double p)
0 < p < 100
(otherwise an
IllegalArgumentException
is thrown)Double.NaN
otherwise)
values
- Is a double[] containing the valuesp
- the requested percentile (scaled from 0 - 100)
public static double percentile(double[] values, int begin, int length, double p)
0 < p < 100
(otherwise an
IllegalArgumentException
is thrown)Double.NaN
otherwise)
values
- Is a double[] containing the valuesbegin
- processing at this point in the arraylength
- processing at this point in the arrayp
- the requested percentile (scaled from 0 - 100)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |