JUCE
|
A class that measures various statistics about a series of floating point values that it is given. More...
Public Member Functions | |
StatisticsAccumulator ()=default | |
Constructs a new StatisticsAccumulator. More... | |
void | addValue (FloatType v) noexcept |
Add a new value to the accumulator. More... | |
void | reset () noexcept |
Reset the accumulator. More... | |
FloatType | getAverage () const noexcept |
Returns the average (arithmetic mean) of all previously added values. More... | |
FloatType | getVariance () const noexcept |
Returns the variance of all previously added values. More... | |
FloatType | getStandardDeviation () const noexcept |
Returns the standard deviation of all previously added values. More... | |
FloatType | getMinValue () const noexcept |
Returns the smallest of all previously added values. More... | |
FloatType | getMaxValue () const noexcept |
Returns the largest of all previously added values. More... | |
size_t | getCount () const noexcept |
Returns how many values have been added to this accumulator. More... | |
A class that measures various statistics about a series of floating point values that it is given.
|
default |
Constructs a new StatisticsAccumulator.
|
noexcept |
Add a new value to the accumulator.
This will update all running statistics accordingly.
References jassert, and juce_isfinite().
|
noexcept |
Reset the accumulator.
This will reset all currently saved statistcs.
|
noexcept |
Returns the average (arithmetic mean) of all previously added values.
If no values have been added yet, this will return zero.
|
noexcept |
Returns the variance of all previously added values.
If no values have been added yet, this will return zero.
Referenced by StatisticsAccumulator< FloatType >::getStandardDeviation().
|
noexcept |
Returns the standard deviation of all previously added values.
If no values have been added yet, this will return zero.
References StatisticsAccumulator< FloatType >::getVariance().
|
noexcept |
Returns the smallest of all previously added values.
If no values have been added yet, this will return positive infinity.
|
noexcept |
Returns the largest of all previously added values.
If no values have been added yet, this will return negative infinity.
|
noexcept |
Returns how many values have been added to this accumulator.
References JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS, and operator+=().