public final class MathUtils
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
MathUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
max(java.util.List<java.lang.Number> numbers)
Returns the max number in the numbers list.
|
static double |
mean(java.util.List<java.lang.Number> numbers)
Returns the mean number in the numbers list.
|
static double |
min(java.util.List<java.lang.Number> numbers)
Returns the min number in the numbers list.
|
static double |
stddev(java.util.List<java.lang.Number> numbers,
boolean biasCorrected)
Returns the standard deviation of the numbers.
|
static double |
sum(java.util.List<java.lang.Number> numbers)
Returns the sum number in the numbers list.
|
static double |
var(java.util.List<java.lang.Number> numbers,
boolean biasCorrected)
Computes the variance of the available values.
|
public static double sum(java.util.List<java.lang.Number> numbers)
numbers
- the numbers to calculate the sum.public static double mean(java.util.List<java.lang.Number> numbers)
numbers
- the numbers to calculate the mean.public static double min(java.util.List<java.lang.Number> numbers)
numbers
- the numbers to calculate the min.public static double max(java.util.List<java.lang.Number> numbers)
numbers
- the numbers to calculate the max.public static double stddev(java.util.List<java.lang.Number> numbers, boolean biasCorrected)
numbers
- the numbers to calculate the standard deviation.biasCorrected
- true if variance is calculated by dividing by n - 1. False if by n. stddev is a sqrt of the
variance.public static double var(java.util.List<java.lang.Number> numbers, boolean biasCorrected)
biasCorrected
property determines whether the "population" or "sample" value is returned by the
evaluate
and getResult
methods. To compute population variances, set this property to
false
.numbers
- the numbers to calculate the variance.biasCorrected
- true if variance is calculated by dividing by n - 1. False if by n.