IT++ Logo
Public Member Functions | List of all members
itpp::ARMA_Filter< T1, T2, T3 > Class Template Reference

Autoregressive Moving Average (ARMA) Filter Base Class. More...

#include <itpp/signal/filter.h>

Inheritance diagram for itpp::ARMA_Filter< T1, T2, T3 >:
itpp::Filter< T1, T2, T3 >

Public Member Functions

 ARMA_Filter ()
 Class constructor. More...
 
 ARMA_Filter (const Vec< T2 > &b, const Vec< T2 > &a)
 Class constructor setting the coefficients in the filter. More...
 
virtual ~ARMA_Filter ()
 Class destructor. More...
 
Vec< T2 > get_coeffs_a () const
 Filter a coefficient access function. More...
 
Vec< T2 > get_coeffs_b () const
 Filter b coefficient access function. More...
 
void get_coeffs (Vec< T2 > &b, Vec< T2 > &a) const
 Filter coefficient access function. More...
 
void set_coeffs (const Vec< T2 > &b, const Vec< T2 > &a)
 Set the filter coefficients (and order) More...
 
void clear ()
 Clears the filter memory. More...
 
Vec< T3 > get_state () const
 Get state of filter. More...
 
void set_state (const Vec< T3 > &state)
 Set state of filter. More...
 
virtual T3 operator() (const T1 Sample)
 Filter a single sample. More...
 
virtual Vec< T3 > operator() (const Vec< T1 > &v)
 Filter a vector. More...
 

Detailed Description

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

Autoregressive Moving Average (ARMA) Filter Base Class.

This class implements a autoregressive moving average (ARMA) filter according to

\[ a(0)*y(n) = b(0)*x(n) + b(1)*x(n-1) + \ldots + b(N_b)*x(n-N_b) - a(1)*y(n-1) - \ldots - a(N_a)*y(n-N_a) \]

where a and b are 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 210 of file filter.h.

Constructor & Destructor Documentation

◆ ARMA_Filter() [1/2]

template<class T1 , class T2 , class T3 >
itpp::ARMA_Filter< T1, T2, T3 >::ARMA_Filter
explicit

Class constructor.

Definition at line 489 of file filter.h.

◆ ARMA_Filter() [2/2]

template<class T1 , class T2 , class T3 >
itpp::ARMA_Filter< T1, T2, T3 >::ARMA_Filter ( const Vec< T2 > &  b,
const Vec< T2 > &  a 
)
explicit

Class constructor setting the coefficients in the filter.

Definition at line 496 of file filter.h.

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

◆ ~ARMA_Filter()

template<class T1 , class T2 , class T3 >
virtual itpp::ARMA_Filter< T1, T2, T3 >::~ARMA_Filter ( )
inlinevirtual

Class destructor.

Definition at line 218 of file filter.h.

Member Function Documentation

◆ get_coeffs_a()

template<class T1 , class T2 , class T3 >
Vec< T2 > itpp::ARMA_Filter< T1, T2, T3 >::get_coeffs_a ( ) const
inline

Filter a coefficient access function.

Definition at line 220 of file filter.h.

◆ get_coeffs_b()

template<class T1 , class T2 , class T3 >
Vec< T2 > itpp::ARMA_Filter< T1, T2, T3 >::get_coeffs_b ( ) const
inline

Filter b coefficient access function.

Definition at line 222 of file filter.h.

◆ get_coeffs()

template<class T1 , class T2 , class T3 >
void itpp::ARMA_Filter< T1, T2, T3 >::get_coeffs ( Vec< T2 > &  b,
Vec< T2 > &  a 
) const
inline

Filter coefficient access function.

Definition at line 224 of file filter.h.

◆ set_coeffs()

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

Set the filter coefficients (and order)

Definition at line 502 of file filter.h.

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

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

◆ clear()

template<class T1 , class T2 , class T3 >
void itpp::ARMA_Filter< T1, T2, T3 >::clear ( void  )
inline

Clears the filter memory.

Definition at line 228 of file filter.h.

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

◆ get_state()

template<class T1 , class T2 , class T3 >
Vec< T3 > itpp::ARMA_Filter< T1, T2, T3 >::get_state ( void  ) const

Get state of filter.

Definition at line 517 of file filter.h.

References it_assert.

Referenced by itpp::filter().

◆ set_state()

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

Set state of filter.

Definition at line 533 of file filter.h.

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

Referenced by itpp::filter().

◆ operator()() [1/2]

template<class T1 , class T2 , class T3 >
virtual T3 itpp::Filter< T1, T2, T3 >::operator() ( const T1  Sample)
inlinevirtualinherited

Filter a single sample.

Definition at line 60 of file filter.h.

References itpp::Filter< T1, T2, T3 >::filter().

◆ operator()() [2/2]

template<class T1 , class T2 , class T3 >
Vec< T3 > itpp::Filter< T1, T2, T3 >::operator() ( const Vec< T1 > &  v)
virtualinherited

Filter a vector.

Definition at line 315 of file filter.h.

References itpp::filter(), and itpp::Vec< Num_T >::length().


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

Generated on Sun Jun 5 2022 21:26:42 for IT++ by Doxygen 1.9.3