public class SampleStats extends Object
Constructor and Description |
---|
SampleStats() |
Modifier and Type | Method and Description |
---|---|
static double |
max(Double[] values,
boolean ignoreNaN)
Return the maximum of the given values.
|
static double |
mean(Double[] values,
boolean ignoreNaN)
Return the mean of the given values.
|
static double |
median(Double[] values,
boolean ignoreNaN)
Calculates the median of the given values.
|
static double |
min(Double[] values,
boolean ignoreNaN)
Calculates the minimum of the given values.
|
static double |
mode(Double[] values,
boolean ignoreNaN)
Calculates the empirical mode (highest frequency value) of the given values.
|
static double |
range(Double[] values,
boolean ignoreNaN)
Calculates the range (max - min) of a set of values.
|
static double |
sdev(Double[] values,
boolean ignoreNaN)
Calculates sample standard deviation.
|
static double |
sum(Double[] values,
boolean ignoreNaN)
Calculates the sum of the values.
|
static double |
variance(Double[] values,
boolean ignoreNaN)
Calculates sample variance using the running sample algorithm
of Welford (1962) described by Knuth in The Art of Computer
Programming (3rd ed) Vol.2 p.232
|
public static double max(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double mean(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double min(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double median(Double[] values, boolean ignoreNaN)
values
- sample values (need not be pre-sorted)ignoreNaN
- specifies whether to ignore NaN valuespublic static double mode(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double range(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double variance(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double sdev(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuespublic static double sum(Double[] values, boolean ignoreNaN)
values
- sample valuesignoreNaN
- specifies whether to ignore NaN valuesCopyright © 2006–2018 GeoSolutions. All rights reserved.