itpp::MA_Filter< T1, T2, T3 > Class Template Reference
[Filtering]

Moving Average Filter Base Class.

This class implements a moving average (MA) filter according to

\[ y(n) = b(0)*x(n) + b(1)*x(n-1) + ... + b(N)*x(n-N) \]

where b is the filter coefficients, x is the input and y is the output. More...

#include <filter.h>

List of all members.

Public Member Functions

 MA_Filter ()
 Class default constructor.
 MA_Filter (const Vec< T2 > &b)
 Class constructor setting the coefficients in the filter.
virtual ~MA_Filter ()
 Class destructor.
Vec< T2 > get_coeffs () const
 Filter coefficient access function.
void set_coeffs (const Vec< T2 > &b)
 Set the filter coefficients.
void clear ()
 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 T1Sample)
 Filter a single sample.
virtual Vec< T3 > operator() (const Vec< T1 > &v)
 Filter a vector.


Detailed Description

template<class T1, class T2, class T3>
class itpp::MA_Filter< T1, T2, T3 >

Moving Average Filter Base Class.

This class implements a moving average (MA) filter according to

\[ y(n) = b(0)*x(n) + b(1)*x(n-1) + ... + b(N)*x(n-N) \]

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:


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

Generated on Tue Jun 2 10:02:19 2009 for mixpp by  doxygen 1.5.8