Package elki.math
Class MeanVarianceMinMax
- java.lang.Object
-
- elki.math.Mean
-
- elki.math.MeanVariance
-
- elki.math.MeanVarianceMinMax
-
- Direct Known Subclasses:
StatisticalMoments
public class MeanVarianceMinMax extends MeanVariance
Class collecting mean, variance, minimum and maximum statistics.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description MeanVarianceMinMax()
Constructor.MeanVarianceMinMax(MeanVarianceMinMax other)
Constructor cloning existing statistics.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDiff()
Return the difference between minimum and maximum.DoubleMinMax
getDoubleMinMax()
Get the current minimum and maximum.double
getMax()
Get the current maximum.double
getMin()
Get the current minimum.static MeanVarianceMinMax[]
newArray(int dimensionality)
Create and initialize a new array of MeanVarianceMinMaxvoid
put(double val)
Add a single value with weight 1.0MeanVarianceMinMax
put(double[] vals)
Add values with weight 1.0MeanVariance
put(double[] vals, double[] weights)
Add values with weight 1.0void
put(double val, double weight)
Add data with a given weight.void
put(Mean other)
Join the data of another MeanVariance instance.MeanVarianceMinMax
reset()
Reset the value.java.lang.String
toString()
-
Methods inherited from class elki.math.MeanVariance
getPopulationStddev, getPopulationVariance, getSampleStddev, getSampleVariance, getSumOfSquares, of
-
Methods inherited from class elki.math.Mean
getCount, getMean, highPrecision, of
-
-
-
-
Constructor Detail
-
MeanVarianceMinMax
public MeanVarianceMinMax()
Constructor.
-
MeanVarianceMinMax
public MeanVarianceMinMax(MeanVarianceMinMax other)
Constructor cloning existing statistics.- Parameters:
other
- Existing statistics
-
-
Method Detail
-
put
public void put(double val)
Description copied from class:MeanVariance
Add a single value with weight 1.0- Overrides:
put
in classMeanVariance
- Parameters:
val
- Value
-
put
public void put(double val, double weight)
Description copied from class:MeanVariance
Add data with a given weight.- Overrides:
put
in classMeanVariance
- Parameters:
val
- dataweight
- weight
-
put
public void put(Mean other)
Description copied from class:MeanVariance
Join the data of another MeanVariance instance.- Overrides:
put
in classMeanVariance
- Parameters:
other
- Data to join with
-
put
public MeanVarianceMinMax put(double[] vals)
Add values with weight 1.0- Overrides:
put
in classMeanVariance
- Parameters:
vals
- Values- Returns:
- this
-
put
public MeanVariance put(double[] vals, double[] weights)
Description copied from class:Mean
Add values with weight 1.0- Overrides:
put
in classMeanVariance
- Parameters:
vals
- Values- Returns:
- this
-
getMin
public double getMin()
Get the current minimum.- Returns:
- current minimum.
-
getMax
public double getMax()
Get the current maximum.- Returns:
- current maximum.
-
getDoubleMinMax
public DoubleMinMax getDoubleMinMax()
Get the current minimum and maximum.- Returns:
- current minimum and maximum
-
getDiff
public double getDiff()
Return the difference between minimum and maximum.- Returns:
- Difference of current Minimum and Maximum.
-
newArray
public static MeanVarianceMinMax[] newArray(int dimensionality)
Create and initialize a new array of MeanVarianceMinMax- Parameters:
dimensionality
- Dimensionality- Returns:
- New and initialized Array
-
toString
public java.lang.String toString()
- Overrides:
toString
in classMeanVariance
-
reset
public MeanVarianceMinMax reset()
Description copied from class:Mean
Reset the value.- Overrides:
reset
in classMeanVariance
- Returns:
- this accumulator
-
-