OpenShot Audio Library | OpenShotAudio: juce::StatisticsAccumulator< FloatType > Class Template Reference

OpenShot Audio Library | OpenShotAudio 0.4.0 |

Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::StatisticsAccumulator< FloatType > Class Template Reference

`#include <juce_StatisticsAccumulator.h>`

## Public Member Functions
| StatisticsAccumulator ()=default
void | addValue (FloatType v) noexcept
void | reset () noexcept
FloatType | getAverage () const noexcept
FloatType | getVariance () const noexcept
FloatType | getStandardDeviation () const noexcept
FloatType | getMinValue () const noexcept
FloatType | getMaxValue () const noexcept
size_t | getCount () const noexcept

## Detailed Description

template<typename FloatType>
class juce::StatisticsAccumulator< FloatType >

A class that measures various statistics about a series of floating point values that it is given.

Definition at line 34 of file juce_StatisticsAccumulator.h.

## Constructor & Destructor Documentation

## ◆ StatisticsAccumulator()

template<typename FloatType>

juce::StatisticsAccumulator< FloatType >::StatisticsAccumulator | ( |  | ) |
| default

Constructs a new StatisticsAccumulator.

Referenced by reset().

## Member Function Documentation

## ◆ addValue()

template<typename FloatType>

void juce::StatisticsAccumulator< FloatType >::addValue | ( | FloatType | v | ) |
| inlinenoexcept

Add a new value to the accumulator. This will update all running statistics accordingly.

Definition at line 45 of file juce_StatisticsAccumulator.h.

## ◆ getAverage()

template<typename FloatType>

FloatType juce::StatisticsAccumulator< FloatType >::getAverage | ( |  | ) | const
| inlinenoexcept

Returns the average (arithmetic mean) of all previously added values. If no values have been added yet, this will return zero.

Definition at line 66 of file juce_StatisticsAccumulator.h.

## ◆ getCount()

template<typename FloatType>

size_t juce::StatisticsAccumulator< FloatType >::getCount | ( |  | ) | const
| inlinenoexcept

Returns how many values have been added to this accumulator.

Definition at line 106 of file juce_StatisticsAccumulator.h.

## ◆ getMaxValue()

template<typename FloatType>

FloatType juce::StatisticsAccumulator< FloatType >::getMaxValue | ( |  | ) | const
| inlinenoexcept

Returns the largest of all previously added values. If no values have been added yet, this will return negative infinity.

Definition at line 100 of file juce_StatisticsAccumulator.h.

## ◆ getMinValue()

template<typename FloatType>

FloatType juce::StatisticsAccumulator< FloatType >::getMinValue | ( |  | ) | const
| inlinenoexcept

Returns the smallest of all previously added values. If no values have been added yet, this will return positive infinity.

Definition at line 92 of file juce_StatisticsAccumulator.h.

## ◆ getStandardDeviation()

template<typename FloatType>

FloatType juce::StatisticsAccumulator< FloatType >::getStandardDeviation | ( |  | ) | const
| inlinenoexcept

Returns the standard deviation of all previously added values. If no values have been added yet, this will return zero.

Definition at line 84 of file juce_StatisticsAccumulator.h.

## ◆ getVariance()

template<typename FloatType>

FloatType juce::StatisticsAccumulator< FloatType >::getVariance | ( |  | ) | const
| inlinenoexcept

Returns the variance of all previously added values. If no values have been added yet, this will return zero.

Definition at line 75 of file juce_StatisticsAccumulator.h.

Referenced by getStandardDeviation().

## ◆ reset()

template<typename FloatType>

void juce::StatisticsAccumulator< FloatType >::reset | ( |  | ) |
| inlinenoexcept

Reset the accumulator. This will reset all currently saved statistcs.

Definition at line 60 of file juce_StatisticsAccumulator.h.

The documentation for this class was generated from the following file:

- juce_StatisticsAccumulator.h