PicoLowLevel
Loading...
Searching...
No Matches
MovingAvgFilter< T > Class Template Reference

Class for a moving average filter implementing the Filter interface. More...

#include <MovingAvgFilter.h>

Inheritance diagram for MovingAvgFilter< T >:
Collaboration diagram for MovingAvgFilter< T >:

Public Member Functions

 MovingAvgFilter (int nsamples)
 Constructor for the moving average filter.
 
filter (T value)
 Computes the filtered output taking into consideration the last nsamples values.
 

Detailed Description

template<typename T>
class MovingAvgFilter< T >

Class for a moving average filter implementing the Filter interface.

Template Parameters
Ttype of the variable to be filtered.

Constructor & Destructor Documentation

◆ MovingAvgFilter()

template<typename T >
MovingAvgFilter< T >::MovingAvgFilter ( int  nsamples)
inline

Constructor for the moving average filter.

Parameters
nsamplesnumber of samples to consider for the average.

Member Function Documentation

◆ filter()

template<typename T >
T MovingAvgFilter< T >::filter ( value)
inlinevirtual

Computes the filtered output taking into consideration the last nsamples values.

Parameters
valueto be filtered.
Returns
T filtered output.

Implements Filter< T >.


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