DUNE: Uniform Navigational Environment  2019.02.1
DUNE::Math::MultiMovingAverage< T > Class Template Reference

Public Member Functions

 MultiMovingAverage (const std::vector< unsigned > &window_sizes)
 
void clear (void)
 
void insertSample (const T &value)
 
void update (const T &value)
 
mean (unsigned j)
 

Constructor & Destructor Documentation

template<typename T>
DUNE::Math::MultiMovingAverage< T >::MultiMovingAverage ( const std::vector< unsigned > &  window_sizes)
inline

Constructor.

Parameters
[in]window_sizessizes of the moving average windows

Member Function Documentation

template<typename T>
void DUNE::Math::MultiMovingAverage< T >::clear ( void  )
inline
template<typename T>
void DUNE::Math::MultiMovingAverage< T >::insertSample ( const T &  value)
inline

Insert new sample.

Parameters
[in]valuenew sample

Referenced by DUNE::Math::MultiMovingAverage< float >::update().

template<typename T>
T DUNE::Math::MultiMovingAverage< T >::mean ( unsigned  j)
inline

Extract mean value of a moving average.

Parameters
[in]jindex of the moving average to be used
Returns
mean value.

Referenced by DUNE::Control::CoarseAltitude::update().

template<typename T>
void DUNE::Math::MultiMovingAverage< T >::update ( const T &  value)
inline

Update sample with new value.

Parameters
[in]valuenew value.

Referenced by DUNE::Control::CoarseAltitude::update().

Collaboration diagram for DUNE::Math::MultiMovingAverage< T >:
Collaboration graph