Package elki.math

## Class 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
• ### Field Summary

Fields
Modifier and Type Field Description
(package private) double max
Maximum value
(package private) double min
Minimum value
• ### Fields inherited from class elki.math.MeanVariance

m2
• ### Fields inherited from class elki.math.Mean

n, sum
• ### Constructor Summary

Constructors
Constructor Description
MeanVarianceMinMax()
Constructor.
MeanVarianceMinMax​(MeanVarianceMinMax other)
Constructor cloning existing statistics.
• ### Method Summary

All 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 MeanVarianceMinMax
void put​(double val)
Add a single value with weight 1.0
MeanVarianceMinMax put​(double[] vals)
MeanVariance put​(double[] vals, double[] weights)
void 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
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Field Detail

• #### min

double min
Minimum value
• #### max

double max
Maximum value
• ### 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 class MeanVariance
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 class MeanVariance
Parameters:
val - data
weight - weight
• #### put

public void put​(Mean other)
Description copied from class: MeanVariance
Join the data of another MeanVariance instance.
Overrides:
put in class MeanVariance
Parameters:
other - Data to join with
• #### put

public MeanVarianceMinMax put​(double[] vals)
Overrides:
put in class MeanVariance
Parameters:
vals - Values
Returns:
this
• #### put

public MeanVariance put​(double[] vals,
double[] weights)
Description copied from class: Mean
Overrides:
put in class MeanVariance
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 class MeanVariance
• #### reset

public MeanVarianceMinMax reset()
Description copied from class: Mean
Reset the value.
Overrides:
reset in class MeanVariance
Returns:
this accumulator