Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SPUC::fir< Numeric > Class Template Reference
[FIR filters]

Template Class for Modeling a Finite Impulse Response filter. More...

#include <fir.h>

Inheritance diagram for SPUC::fir< Numeric >:

Inheritance graph
[legend]
Collaboration diagram for SPUC::fir< Numeric >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void settap (long i, Numeric tap)
 Set tap weights.
void reset ()
 Reset.
Numeric coeff_sum ()
 Get sum of coefficients.
Numeric out ()
 Get current output.
Numeric check (long i)
 Clock in new sample & compute current output.
 ~fir (void)
 fir (void)
 Constructor.
 fir (long n)
 Constructor.
void set_size (long n)
 Set size of Filter.
long get_size (void)
 fir (const char *file)
 Constructor that gets coefficients from file (requires fir.cpp).
Numeric clock (Numeric in)
 Update filter by inputting 1 sample and returning convolved output sample.
Numeric update (Numeric in)
Numeric iir (Numeric in)
int read_taps (const char *file)
int read_complex_taps (const char *file)
void print (void)
void settap (Vector< Numeric > z)
template<>
int read_taps (const char *file)

Public Attributes

long num_taps
Numeric * coeff
Numeric * z
Numeric output

Friends

template<class N>
Vector< N > Vector_taps (fir< N > x)
template<class N>
Vector< N > Vector_input (fir< N > y)

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]
 

template<class Numeric>
SPUC::fir< Numeric >::fir void   )  [inline]
 

Constructor.

template<class Numeric>
SPUC::fir< Numeric >::fir long  n  )  [inline]
 

Constructor.

template<class Numeric>
SPUC::fir< Numeric >::fir const char *  file  )  [inline]
 

Constructor that gets coefficients from file (requires fir.cpp).


Member Function Documentation

template<class Numeric>
Numeric SPUC::fir< Numeric >::check long  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.

Reimplemented in SPUC::fir_interp< Numeric >, and SPUC::fir_interp< complex< double > >.

template<class Numeric>
long SPUC::fir< Numeric >::get_size void   )  [inline]
 

template<class Numeric>
Numeric SPUC::fir< Numeric >::iir Numeric  in  )  [inline]
 

template<class Numeric>
Numeric SPUC::fir< Numeric >::out  )  [inline]
 

Get current output.

template<class Numeric>
void SPUC::fir< Numeric >::print void   ) 
 

template<class Numeric>
int SPUC::fir< Numeric >::read_complex_taps const char *  file  ) 
 

template<>
int SPUC::fir< long >::read_taps const char *  file  ) 
 

template<class Numeric>
int SPUC::fir< Numeric >::read_taps const char *  file  ) 
 

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

Reset.

Reimplemented in SPUC::fir_adapt< Numeric >, SPUC::fir_interp< Numeric >, SPUC::fir_multi_interp< Numeric >, SPUC::fir_adapt< complex< double > >, and SPUC::fir_interp< complex< double > >.

template<class Numeric>
void SPUC::fir< Numeric >::set_size long  n  )  [inline]
 

Set size of Filter.

template<class Numeric>
void SPUC::fir< Numeric >::settap Vector< Numeric >  z  )  [inline]
 

template<class Numeric>
void SPUC::fir< Numeric >::settap long  i,
Numeric  tap
[inline]
 

Set tap weights.

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

Reimplemented in SPUC::fir_sparse_coef< Numeric >.


Friends And Related Function Documentation

template<class Numeric>
template<class N>
Vector<N> Vector_input fir< N >  y  )  [friend]
 

template<class Numeric>
template<class N>
Vector<N> Vector_taps fir< N >  x  )  [friend]
 


Member Data Documentation

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

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

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

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


The documentation for this class was generated from the following file:
Generated on Fri Sep 16 11:08:47 2005 for spuc by  doxygen 1.4.4