IT++ Logo Newcom Logo

itpp::AR_Filter< T1, T2, T3 > Class Template Reference
[Filter Classes and Functions]

Autoregressive (AR) Filter Base Class.

This class implements a autoregressive (AR) filter according to

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

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

#include <itpp/base/filter.h>

Inheritance diagram for itpp::AR_Filter< T1, T2, T3 >:

itpp::Filter< T1, T2, T3 > List of all members.

Public Member Functions

 AR_Filter ()
 Class constructor.
 AR_Filter (const Vec< T2 > &a)
 Class constructor setting the coefficients in the filter.
virtual ~AR_Filter ()
 Class destructor.
Vec< T2 > get_coeffs () const
 Filter coefficient access function.
void set_coeffs (const Vec< T2 > &a)
 Set the filter coefficients (and order).
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 T1 Sample)
 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::AR_Filter< T1, T2, T3 >

Autoregressive (AR) Filter Base Class.

This class implements a autoregressive (AR) filter according to

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

where a 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:

Definition at line 153 of file filter.h.


Constructor & Destructor Documentation

template<class T1, class T2, class T3>
itpp::AR_Filter< T1, T2, T3 >::AR_Filter  )  [explicit]
 

Class constructor.

Definition at line 404 of file filter.h.

template<class T1, class T2, class T3>
itpp::AR_Filter< T1, T2, T3 >::AR_Filter const Vec< T2 > &  a  )  [explicit]
 

Class constructor setting the coefficients in the filter.

Definition at line 411 of file filter.h.

References itpp::AR_Filter< T1, T2, T3 >::set_coeffs().

template<class T1, class T2, class T3>
virtual itpp::AR_Filter< T1, T2, T3 >::~AR_Filter  )  [inline, virtual]
 

Class destructor.

Definition at line 160 of file filter.h.


Member Function Documentation

template<class T1, class T2, class T3>
Vec<T2> itpp::AR_Filter< T1, T2, T3 >::get_coeffs  )  const [inline]
 

Filter coefficient access function.

Definition at line 162 of file filter.h.

template<class T1, class T2, class T3>
void itpp::AR_Filter< T1, T2, T3 >::set_coeffs const Vec< T2 > &  a  ) 
 

Set the filter coefficients (and order).

Definition at line 417 of file filter.h.

References itpp::Vec< Num_T >::clear(), it_assert, itpp::Vec< Num_T >::set_size(), and itpp::Vec< Num_T >::size().

Referenced by itpp::AR_Filter< T1, T2, T3 >::AR_Filter().

template<class T1, class T2, class T3>
void itpp::AR_Filter< T1, T2, T3 >::clear  )  [inline]
 

Clears the filter memory.

Definition at line 166 of file filter.h.

References itpp::Vec< Num_T >::clear().

template<class T1, class T2, class T3>
Vec< T3 > itpp::AR_Filter< T1, T2, T3 >::get_state  )  const
 

Get state of filter.

Definition at line 433 of file filter.h.

References it_assert, and itpp::Vec< Num_T >::size().

Referenced by itpp::filter().

template<class T1, class T2, class T3>
void itpp::AR_Filter< T1, T2, T3 >::set_state const Vec< T3 > &  state  ) 
 

Set state of filter.

Definition at line 449 of file filter.h.

References it_assert, and itpp::Vec< Num_T >::size().

Referenced by itpp::filter().

template<class T1, class T2, class T3>
virtual T3 itpp::Filter< T1, T2, T3 >::operator() const T1  Sample  )  [inline, virtual, inherited]
 

Filter a single sample.

Definition at line 62 of file filter.h.

template<class T1, class T2, class T3>
Vec< T3 > itpp::Filter< T1, T2, T3 >::operator() const Vec< T1 > &  v  )  [virtual, inherited]
 

Filter a vector.

Definition at line 313 of file filter.h.

References itpp::Filter< T1, T2, T3 >::filter(), and itpp::Vec< Num_T >::length().


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

Generated on Thu Apr 19 14:20:01 2007 for IT++ by Doxygen 1.4.6