itpp_sci  4
Public Member Functions | Public Attributes | List of all members
SPUC::fir< Numeric > Class Template Reference

Template Class for Modeling a Finite Impulse Response filter.
Template works for double, long, complex, etc
Taps initialized to zeros. More...

#include <spuc_fir.hpp>

Public Member Functions

 ~fir (void)
 Destructor. More...
 
 fir (void)
 Constructor. More...
 
 fir (int n)
 Constructor. More...
 
void set_size (int n)
 Set size of Filter. More...
 
void set_taps (int i, Numeric tap)
 Set tap weights - single. More...
 
void set_taps (Vector< Numeric > v)
 Set tap weights - vector. More...
 
void reset ()
 Reset. More...
 
Numeric coeff_sum ()
 Get sum of coefficients. More...
 
int get_size (void)
 Get fir size. More...
 
Vector< Numeric > get_taps (void)
 Get taps as vector. More...
 
Vector< Numeric > get_input (void)
 Get input as vector. More...
 
Numeric out ()
 Get current output. More...
 
Numeric check (int i)
 Clock in new sample & compute current output. More...
 
Numeric clock (Numeric in)
 Update filter by inputting 1 sample and returning convolved output sample. More...
 
Numeric update (Numeric in)
 Update filter by inputting 1 sample and returning convolved output sample. More...
 

Public Attributes

int num_taps
 size of filter - public(?) More...
 
Numeric * coeff
 pointer to coeff created on the heap - public(?) More...
 
Numeric * z
 pointer to state created on the heap - public(?) More...
 
Numeric output
 output - public(?) More...
 

Detailed Description

template<class Numeric>
class SPUC::fir< Numeric >

Template Class for Modeling a Finite Impulse Response filter.


Template works for double, long, complex, etc
Taps initialized to zeros.

fir.gif

Constructor & Destructor Documentation

template<class Numeric>
SPUC::fir< Numeric >::~fir ( void  )
inline

Destructor.

template<class Numeric>
SPUC::fir< Numeric >::fir ( void  )
inline

Constructor.

template<class Numeric>
SPUC::fir< Numeric >::fir ( int  n)
inline

Constructor.

Member Function Documentation

template<class Numeric>
Numeric SPUC::fir< Numeric >::check ( int  i)
inline

Clock in new sample & compute current output.

template<class Numeric>
Numeric SPUC::fir< Numeric >::clock ( Numeric  in)
inline

Update filter by inputting 1 sample and returning convolved output sample.

template<class Numeric>
Numeric SPUC::fir< Numeric >::coeff_sum ( )
inline

Get sum of coefficients.

template<class Numeric>
Vector<Numeric> SPUC::fir< Numeric >::get_input ( void  )
inline

Get input as vector.

template<class Numeric>
int SPUC::fir< Numeric >::get_size ( void  )
inline

Get fir size.

template<class Numeric>
Vector<Numeric> SPUC::fir< Numeric >::get_taps ( void  )
inline

Get taps as vector.

template<class Numeric>
Numeric SPUC::fir< Numeric >::out ( )
inline

Get current output.

template<class Numeric>
void SPUC::fir< Numeric >::reset ( )
inline

Reset.

template<class Numeric>
void SPUC::fir< Numeric >::set_size ( int  n)
inline

Set size of Filter.

template<class Numeric>
void SPUC::fir< Numeric >::set_taps ( int  i,
Numeric  tap 
)
inline

Set tap weights - single.

template<class Numeric>
void SPUC::fir< Numeric >::set_taps ( Vector< Numeric >  v)
inline

Set tap weights - vector.

template<class Numeric>
Numeric SPUC::fir< Numeric >::update ( Numeric  in)
inline

Update filter by inputting 1 sample and returning convolved output sample.

Member Data Documentation

template<class Numeric>
Numeric* SPUC::fir< Numeric >::coeff

pointer to coeff created on the heap - public(?)

template<class Numeric>
int SPUC::fir< Numeric >::num_taps

size of filter - public(?)

template<class Numeric>
Numeric SPUC::fir< Numeric >::output

output - public(?)

template<class Numeric>
Numeric* SPUC::fir< Numeric >::z

pointer to state created on the heap - public(?)


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