Moving Average Filter Base Class.This class implements a moving average (MA) filter according to
where b is the filter coefficients, x is the input and y is the output. More...
|Class default constructor. |
|MA_Filter (const Vec< T2 > &b)|
|Class constructor setting the coefficients in the filter. |
|Class destructor. |
|Vec< T2 >||get_coeffs () const|
|Filter coefficient access function. |
|void||set_coeffs (const Vec< T2 > &b)|
|Set the filter coefficients. |
|Clears the filter memory. |
|Vec< T3 >||get_state () const|
|Get state of filter. |
|void||set_state (const Vec< T3 > &state)|
|Set state of filter. |
|virtual T3||operator() (const T1 Sample)|
|Filter a single sample. |
|virtual Vec< T3 >||operator() (const Vec< T1 > &v)|
|Filter a vector. |
Moving Average Filter Base Class.
This class implements a moving average (MA) filter according to
where b is the filter coefficients, x is the input and y is the output.
When filtering a vector, the length of the output vector equals the length of the input vector. Internal states are kept in a filter memory. The first time the filter is used the internal states have been set to zero.
The class is templated as follows:
T1is the type of the input samples
T2is the type of the filter coefficients
T3is the type of the output samples