SPUC::fir< Numeric, Coeff > Class Template Reference
[SPUC double templatesFIR filters]

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

#include <fir.h>

Inheritance diagram for SPUC::fir< Numeric, Coeff >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef base_type< Numeric
>::btype 
Numeric_base
typedef mixed_type< Numeric,
Coeff >::dtype 
sum_type

Public Member Functions

void settap (long i, Coeff tap)
 Set tap weights.
void settaps (fir_coeff< Coeff > &c)
long number_of_taps ()
Coeff gettap (long i)
void reset ()
 Reset.
Coeff coeff_sum ()
 Get sum of coefficients.
Numeric out ()
 Get current output.
Numeric check (long i)
 Clock in new sample & compute current output.
void set_round_bits (long x)
 ~fir (void)
 fir (void)
 Constructor.
 fir (long n, long rb=0)
 Constructor.
 fir (fir_coeff< Coeff > C)
 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)
void print (void)
void settap (smart_array< Coeff > z)

Public Attributes

smart_array< Coeff > coeff
smart_array< Numeric > z
Numeric output
quantiser< Numeric > Q
long num_taps

Friends

template<class N, class C>
smart_array< C > get_taps (fir< N, C > x)
template<class N, class C>
smart_array< N > get_input (fir< N, C > y)

Detailed Description

template<class Numeric, class Coeff = float_type>
class SPUC::fir< Numeric, Coeff >

Template Class for Modeling a Finite Impulse Response filter.

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

Author:
Tony Kirke
fir.png
fir.gif


Member Typedef Documentation

template<class Numeric, class Coeff = float_type>
typedef base_type<Numeric>::btype SPUC::fir< Numeric, Coeff >::Numeric_base

template<class Numeric, class Coeff = float_type>
typedef mixed_type<Numeric,Coeff>::dtype SPUC::fir< Numeric, Coeff >::sum_type


Constructor & Destructor Documentation

template<class Numeric, class Coeff = float_type>
SPUC::fir< Numeric, Coeff >::~fir ( void   )  [inline]

template<class Numeric, class Coeff = float_type>
SPUC::fir< Numeric, Coeff >::fir ( void   )  [inline]

Constructor.

template<class Numeric, class Coeff = float_type>
SPUC::fir< Numeric, Coeff >::fir ( long  n,
long  rb = 0 
) [inline]

Constructor.

template<class Numeric, class Coeff = float_type>
SPUC::fir< Numeric, Coeff >::fir ( fir_coeff< Coeff >  C  )  [inline]

Constructor.

template<class Numeric, class Coeff = float_type>
SPUC::fir< Numeric, Coeff >::fir ( const char *  file  )  [inline]

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


Member Function Documentation

template<class Numeric, class Coeff = float_type>
Numeric SPUC::fir< Numeric, Coeff >::check ( long  i  )  [inline]

Clock in new sample & compute current output.

template<class Numeric, class Coeff = float_type>
Numeric SPUC::fir< Numeric, Coeff >::clock ( Numeric  in  )  [inline]

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

template<class Numeric, class Coeff = float_type>
Coeff SPUC::fir< Numeric, Coeff >::coeff_sum (  )  [inline]

Get sum of coefficients.

Reimplemented in SPUC::fir_interp< Numeric, Coeff >, SPUC::fir_interp< SPUC::complex< fundtype< Numeric >::ftype >, Numeric >, and SPUC::fir_interp< SPUC::complex< CNumeric >, double >.

template<class Numeric, class Coeff = float_type>
long SPUC::fir< Numeric, Coeff >::get_size ( void   )  [inline]

template<class Numeric, class Coeff = float_type>
Coeff SPUC::fir< Numeric, Coeff >::gettap ( long  i  )  [inline]

template<class Numeric, class Coeff = float_type>
Numeric SPUC::fir< Numeric, Coeff >::iir ( Numeric  in  )  [inline]

template<class Numeric, class Coeff = float_type>
long SPUC::fir< Numeric, Coeff >::number_of_taps (  )  [inline]

template<class Numeric, class Coeff = float_type>
Numeric SPUC::fir< Numeric, Coeff >::out (  )  [inline]

Get current output.

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::print ( void   )  [inline]

template<class Numeric, class Coeff = float_type>
int SPUC::fir< Numeric, Coeff >::read_taps ( const char *  file  )  [inline]

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::reset ( void   )  [inline]

Reset.

Reimplemented in SPUC::fir_adapt< Numeric, Coeff >, SPUC::fir_interp< Numeric, Coeff >, SPUC::fir_adapt< Numeric, Numeric >, SPUC::fir_interp< SPUC::complex< fundtype< Numeric >::ftype >, Numeric >, and SPUC::fir_interp< SPUC::complex< CNumeric >, double >.

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::set_round_bits ( long  x  )  [inline]

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::set_size ( long  n  )  [inline]

Set size of Filter.

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::settap ( smart_array< Coeff >  z  )  [inline]

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::settap ( long  i,
Coeff  tap 
) [inline]

Set tap weights.

template<class Numeric, class Coeff = float_type>
void SPUC::fir< Numeric, Coeff >::settaps ( fir_coeff< Coeff > &  c  )  [inline]

template<class Numeric, class Coeff = float_type>
Numeric SPUC::fir< Numeric, Coeff >::update ( Numeric  in  )  [inline]


Friends And Related Function Documentation

template<class Numeric, class Coeff = float_type>
template<class N, class C>
smart_array<N> get_input ( fir< N, C >  y  )  [friend]

template<class Numeric, class Coeff = float_type>
template<class N, class C>
smart_array<C> get_taps ( fir< N, C >  x  )  [friend]


Member Data Documentation

template<class Numeric, class Coeff = float_type>
smart_array<Coeff> SPUC::fir< Numeric, Coeff >::coeff

template<class Numeric, class Coeff = float_type>
long SPUC::fir< Numeric, Coeff >::num_taps

template<class Numeric, class Coeff = float_type>
Numeric SPUC::fir< Numeric, Coeff >::output

template<class Numeric, class Coeff = float_type>
quantiser<Numeric> SPUC::fir< Numeric, Coeff >::Q

template<class Numeric, class Coeff = float_type>
smart_array<Numeric> SPUC::fir< Numeric, Coeff >::z


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 19:40:38 2008 for DSPTemplates by  doxygen 1.4.7