SPUC  3.0
Public Member Functions | Public Attributes | Friends | List of all members
SPUC::fir_coeff< Numeric > Class Template Reference

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

#include <fir_coeff.h>

Public Member Functions

void settap (long i, Numeric tap)
 Set tap weights. More...
 
Numeric gettap (long i)
 
Numeric coeff_sum ()
 Get sum of coefficients. More...
 
 ~fir_coeff (void)
 Constructor. More...
 
 fir_coeff (void)
 Constructor. More...
 
 fir_coeff (long n)
 Constructor. More...
 
void set_size (long n)
 Set size of Filter. More...
 
long get_size (void)
 
 fir_coeff (const char *file)
 Constructor that gets coefficients from file (requires fir_coeff.cpp) More...
 
int read_taps (const char *file)
 
void quantize (int bits)
 
void make_hpf ()
 
void print (void)
 
void settap (std::vector< Numeric > z)
 
float_type freqz_mag (float_type freq)
 
template<>
void print ()
 
template<>
void print ()
 
template<>
void print ()
 
template<>
void print ()
 
template<>
int read_taps (const char *file)
 
template<>
int read_taps (const char *file)
 
template<>
int read_taps (const char *file)
 
template<>
int read_taps (const char *file)
 

Public Attributes

std::vector< Numeric > coeff
 
long num_taps
 

Friends

template<class N >
std::vector< N > get_taps (fir_coeff< N > x)
 

Detailed Description

template<class Numeric>
class SPUC::fir_coeff< Numeric >

Template Class for Modeling a Finite Impulse Response filter.

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

Author
Tony Kirke
fir.gif

Constructor & Destructor Documentation

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

Constructor.

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

Constructor.

template<class Numeric>
SPUC::fir_coeff< Numeric >::fir_coeff ( long  n)
inline

Constructor.

References SPUC::fir_coeff< Numeric >::set_size().

Here is the call graph for this function:

template<class Numeric>
SPUC::fir_coeff< Numeric >::fir_coeff ( const char *  file)
inline

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

References SPUC::fir_coeff< Numeric >::read_taps().

Here is the call graph for this function:

Member Function Documentation

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

Get sum of coefficients.

References SPUC::fir_coeff< Numeric >::num_taps.

template<class Numeric>
float_type SPUC::fir_coeff< Numeric >::freqz_mag ( float_type  freq)
inline

References SPUC::cos(), SPUC::magsq(), SPUC::fir_coeff< Numeric >::num_taps, and SPUC::sqrt().

Here is the call graph for this function:

template<class Numeric>
long SPUC::fir_coeff< Numeric >::get_size ( void  )
inline
template<class Numeric>
Numeric SPUC::fir_coeff< Numeric >::gettap ( long  i)
inline
template<class Numeric>
void SPUC::fir_coeff< Numeric >::make_hpf ( )
inline
template<>
void SPUC::fir_coeff< float_type >::print ( void  )
template<>
void SPUC::fir_coeff< long >::print ( void  )
template<>
void SPUC::fir_coeff< complex< float_type > >::print ( void  )
template<>
void SPUC::fir_coeff< complex< long > >::print ( void  )
template<class Numeric>
void SPUC::fir_coeff< Numeric >::print ( void  )
inline
template<class Numeric>
void SPUC::fir_coeff< Numeric >::quantize ( int  bits)
inline
template<class Numeric>
int SPUC::fir_coeff< Numeric >::read_taps ( const char *  file)
inline
template<>
int SPUC::fir_coeff< complex< long > >::read_taps ( const char *  file)
template<>
int SPUC::fir_coeff< complex< float_type > >::read_taps ( const char *  file)
template<>
int SPUC::fir_coeff< long >::read_taps ( const char *  file)
template<>
int SPUC::fir_coeff< float_type >::read_taps ( const char *  file)
template<class Numeric>
void SPUC::fir_coeff< Numeric >::set_size ( long  n)
inline

Set size of Filter.

Referenced by SPUC::fir_coeff< Numeric >::fir_coeff().

template<class Numeric>
void SPUC::fir_coeff< Numeric >::settap ( long  i,
Numeric  tap 
)
inline

Set tap weights.

Referenced by SPUC::create_remez_fir(), and SPUC::create_remez_lpfir().

template<class Numeric>
void SPUC::fir_coeff< Numeric >::settap ( std::vector< Numeric >  z)
inline

Friends And Related Function Documentation

template<class Numeric>
template<class N >
std::vector<N> get_taps ( fir_coeff< N >  x)
friend

Member Data Documentation

template<class Numeric>
std::vector<Numeric> SPUC::fir_coeff< Numeric >::coeff
template<class Numeric>
long SPUC::fir_coeff< Numeric >::num_taps

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