senf::StatisticsEWMA< T > Class Template Reference

#include <senf/Utils/StatisticAccumulator.hh>

Inheritance diagram for senf::StatisticsEWMA< T >:

Public Member Functions

 StatisticsEWMA (float alpha=0.25f, T const &value=T())
 
void clear (T const &value=T())
 Reset accumulated values. More...
 
void accumulate (T const &value)
 Gather value to be accumulated. More...
 
void accumulateWithLoss (T const &value, unsigned numLost)
 Gather value to be accumulated. More...
 
bool operator< (StatisticsEWMA< T > const &other) const
 
 operator bool () const
 Returns true if valid data is present. More...
 
unsigned count () const
 Returns count of accumulated values. More...
 
T const & ewma () const
 
float const & alpha () const
 

Detailed Description

template<class T>
class senf::StatisticsEWMA< T >

Definition at line 129 of file StatisticAccumulator.hh.

Constructor & Destructor Documentation

◆ StatisticsEWMA()

template<class T >
senf::StatisticsEWMA< T >::StatisticsEWMA ( float  alpha = 0.25f,
T const &  value = T() 
)

Member Function Documentation

◆ accumulate()

template<class T >
void senf::StatisticsEWMA< T >::accumulate ( T const &  value)

Gather value to be accumulated.

◆ accumulateWithLoss()

template<class T >
void senf::StatisticsEWMA< T >::accumulateWithLoss ( T const &  value,
unsigned  numLost 
)

Gather value to be accumulated.

◆ alpha()

template<class T >
float const& senf::StatisticsEWMA< T >::alpha ( ) const

◆ clear()

template<class T >
void senf::StatisticsEWMA< T >::clear ( T const &  value = T())

Reset accumulated values.

This member reset all values.

◆ count()

template<class T >
unsigned senf::StatisticsEWMA< T >::count ( ) const

Returns count of accumulated values.

This method returns count of accumulated values of the current accumulation.

◆ ewma()

template<class T >
T const& senf::StatisticsEWMA< T >::ewma ( ) const

◆ operator bool()

template<class T >
senf::StatisticsEWMA< T >::operator bool ( ) const
explicit

Returns true if valid data is present.

This method indicates if valid data is present

◆ operator<()

template<class T >
bool senf::StatisticsEWMA< T >::operator< ( StatisticsEWMA< T > const &  other) const

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