Enum Statistic
- java.lang.Object
-
- java.lang.Enum<Statistic>
-
- org.apache.commons.statistics.descriptive.Statistic
-
- All Implemented Interfaces:
Serializable
,Comparable<Statistic>
public enum Statistic extends Enum<Statistic>
A statistic that can be computed on univariate data, for example a stream ofdouble
values.Statistic
is an enum representing the statistics that can be computed by implementations in theorg.apache.commons.statistics.descriptive
package.Note
Implementations may provide additional parameters to control the computation of the statistic, for example to compute the population (biased) or sample (unbiased) variance.
- Since:
- 1.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GEOMETRIC_MEAN
Geometric mean.KURTOSIS
Kurtosis.MAX
Maximum.MEAN
Mean, or average.MIN
Minimum.PRODUCT
Product.SKEWNESS
Skewness.STANDARD_DEVIATION
Standard deviation.SUM
Sum.SUM_OF_LOGS
Sum of the natural logarithm of values.SUM_OF_SQUARES
Sum of the squared values.VARIANCE
Variance.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Statistic
valueOf(String name)
Returns the enum constant of this type with the specified name.static Statistic[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STANDARD_DEVIATION
public static final Statistic STANDARD_DEVIATION
Standard deviation.
-
SUM_OF_LOGS
public static final Statistic SUM_OF_LOGS
Sum of the natural logarithm of values.
-
SUM_OF_SQUARES
public static final Statistic SUM_OF_SQUARES
Sum of the squared values.
-
GEOMETRIC_MEAN
public static final Statistic GEOMETRIC_MEAN
Geometric mean.
-
-
Method Detail
-
values
public static Statistic[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Statistic c : Statistic.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Statistic valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-