JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

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

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

#include "juce_StatisticsAccumulator.h"

Public Member Functions

 StatisticsAccumulator ()=default
 Constructs a new StatisticsAccumulator.
 
void addValue (FloatType v) noexcept
 Add a new value to the accumulator.
 
void reset () noexcept
 Reset the accumulator.
 
FloatType getAverage () const noexcept
 Returns the average (arithmetic mean) of all previously added values.
 
FloatType getVariance () const noexcept
 Returns the variance of all previously added values.
 
FloatType getStandardDeviation () const noexcept
 Returns the standard deviation of all previously added values.
 
FloatType getMinValue () const noexcept
 Returns the smallest of all previously added values.
 
FloatType getMaxValue () const noexcept
 Returns the largest of all previously added values.
 
size_t getCount () const noexcept
 Returns how many values have been added to this accumulator.
 

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.

@tags{Core}

Definition at line 34 of file juce_StatisticsAccumulator.h.

Member Function Documentation

◆ addValue()

template<typename FloatType >
void juce::StatisticsAccumulator< FloatType >::addValue ( FloatType  v)
noexcept

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
noexcept

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
noexcept

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
noexcept

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
noexcept

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
noexcept

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
noexcept

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.

◆ reset()

template<typename FloatType >
void juce::StatisticsAccumulator< FloatType >::reset ( )
noexcept

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: