|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.utils.MathUtils
public final class MathUtils
A collection of several util methods related to Math. We only used it in DefaultSummaryCalculator in JIDE Pivot Grid to calculate statistics but this class will be reserved as a place holder for methods related to Math.
Constructor Summary | |
---|---|
protected |
MathUtils()
|
Method Summary | |
---|---|
static double |
max(List<Number> numbers)
Returns the max number in the numbers list. |
static double |
mean(List<Number> numbers)
Returns the mean number in the numbers list. |
static double |
min(List<Number> numbers)
Returns the min number in the numbers list. |
static double |
stddev(List<Number> numbers,
boolean biasCorrected)
Returns the standard deviation of the numbers. |
static double |
sum(List<Number> numbers)
Returns the sum number in the numbers list. |
static double |
var(List<Number> numbers,
boolean biasCorrected)
Computes the variance of the available values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MathUtils()
Method Detail |
---|
public static double sum(List<Number> numbers)
numbers
- the numbers to calculate the sum.
public static double mean(List<Number> numbers)
numbers
- the numbers to calculate the mean.
public static double min(List<Number> numbers)
numbers
- the numbers to calculate the min.
public static double max(List<Number> numbers)
numbers
- the numbers to calculate the max.
public static double stddev(List<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(List<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.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |