EMANE  1.2.1
EMANE::Utils::RunningAverage< T > Class Template Reference

A running average statistic wrapper. More...

#include <runningaverage.h>

Public Member Functions

 RunningAverage ()
 
void update (T value)
 
void registerStatistic (StatisticNumeric< T > *p)
 

Detailed Description

template<class T>
class EMANE::Utils::RunningAverage< T >

A running average statistic wrapper.

Definition at line 48 of file runningaverage.h.

Constructor & Destructor Documentation

◆ RunningAverage()

template<class T>
EMANE::Utils::RunningAverage< T >::RunningAverage ( )
inline

Creates a RunningAverage instance

Definition at line 54 of file runningaverage.h.

Member Function Documentation

◆ registerStatistic()

template<class T>
void EMANE::Utils::RunningAverage< T >::registerStatistic ( StatisticNumeric< T > *  p)
inline

Assign the underlying statistic to hold the running average

Parameters
pPointer to a numeric statistic

Definition at line 96 of file runningaverage.h.

◆ update()

template<class T>
void EMANE::Utils::RunningAverage< T >::update ( value)
inline

Updates the running average

Parameters
valueNew value to add to running average
Note
Internally detects when the underlying statistic has been cleared and accounts for the change

Definition at line 68 of file runningaverage.h.


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