Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
MovingAverage< T, N > Class Template Reference

Template class that implements a moving average filter as fifo. More...

#include <movingaverage.h>

Public Member Functions

double operator() ()
 Operator overload to return the average value.
 
void operator() (T tSample)
 Operator overload to add a new value to the filter.
 

Detailed Description

template<typename T, int N>
class MovingAverage< T, N >

Template class that implements a moving average filter as fifo.

Template Parameters
Tdata type of the filter
Nsize of the filter

Member Function Documentation

◆ operator()() [1/2]

template<typename T , int N>
double MovingAverage< T, N >::operator() ( )
inline

Operator overload to return the average value.

Returns
the average value as double

◆ operator()() [2/2]

template<typename T , int N>
void MovingAverage< T, N >::operator() ( tSample)
inline

Operator overload to add a new value to the filter.

Parameters
tSamplenew value

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