SPUC  3.0
Public Types | Public Member Functions | Public Attributes | List of all members
SPUC::fir_adapt< Numeric, Coeff > Class Template Reference

template class fir_adapt Based on FIR class, created to support LMS adaptive filtering More...

#include <fir_adapt.h>

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

Public Types

typedef base_type< Numeric >::btype real_type
 
- Public Types inherited from SPUC::fir< Numeric, Coeff >
typedef base_type< Numeric >::btype Numeric_base
 
typedef mixed_type< Numeric,
Coeff >::dtype 
sum_type
 

Public Member Functions

 fir_adapt (void)
 Constructor. More...
 
 fir_adapt (long n, real_type gain)
 Constructor with size. More...
 
void reset ()
 Reset both history and coefficients! More...
 
void set_gain (real_type gain)
 Set adaptation gain. More...
 
void update_lms (Numeric err)
 Calculate updated taps using LMS algorithm. More...
 
void update_lms_sign_coeff (Numeric err)
 Calculate updated taps using LMS algorithm and sign of input. More...
 
- Public Member Functions inherited from SPUC::fir< Numeric, Coeff >
void settap (long i, Coeff tap)
 Set tap weights. More...
 
void settaps (fir_coeff< Coeff > &c)
 
long number_of_taps ()
 
Coeff gettap (long i)
 
void reset ()
 Reset. More...
 
Coeff coeff_sum ()
 Get sum of coefficients. More...
 
void normalize_gain ()
 
void make_hpf ()
 
Numeric out ()
 Get current output. More...
 
Numeric check (long i)
 Clock in new sample & compute current output. More...
 
void set_round_bits (long x)
 
 ~fir (void)
 
 fir (void)
 Constructor. More...
 
 fir (long n, long rb=0)
 Constructor. More...
 
 fir (fir_coeff< Coeff > C)
 Constructor. More...
 
void set_size (long n)
 Set size of Filter. More...
 
long get_size (void)
 
 fir (const char *file)
 Constructor that gets coefficients from file (requires fir.cpp) More...
 
Numeric clock (Numeric in)
 Update filter by inputting 1 sample and returning convolved output sample. More...
 
Numeric update (Numeric in)
 
Numeric iir (Numeric in)
 
int read_taps (const char *file)
 
void print (void)
 
void settap (std::vector< Coeff > z)
 

Public Attributes

real_type u
 Adaptation gain. More...
 
- Public Attributes inherited from SPUC::fir< Numeric, Coeff >
std::vector< Coeff > coeff
 
std::vector< Numeric > z
 
Numeric output
 
quantiser< Numeric > Q
 
long num_taps
 

Detailed Description

template<class Numeric, class Coeff = double>
class SPUC::fir_adapt< Numeric, Coeff >

template class fir_adapt Based on FIR class, created to support LMS adaptive filtering

Author
Tony Kirke
Tony Kirke
fir_adapt.gif

Member Typedef Documentation

template<class Numeric, class Coeff = double>
typedef base_type<Numeric>::btype SPUC::fir_adapt< Numeric, Coeff >::real_type

Constructor & Destructor Documentation

template<class Numeric, class Coeff = double>
SPUC::fir_adapt< Numeric, Coeff >::fir_adapt ( void  )
inline

Constructor.

template<class Numeric, class Coeff = double>
SPUC::fir_adapt< Numeric, Coeff >::fir_adapt ( long  n,
real_type  gain 
)
inline

Constructor with size.

Member Function Documentation

template<class Numeric, class Coeff = double>
void SPUC::fir_adapt< Numeric, Coeff >::reset ( void  )
inline

Reset both history and coefficients!

Referenced by SPUC::lms_dfe< Numeric, Coeff >::reset(), and SPUC::mle< Numeric >::reset().

template<class Numeric, class Coeff = double>
void SPUC::fir_adapt< Numeric, Coeff >::set_gain ( real_type  gain)
inline
template<class Numeric, class Coeff = double>
void SPUC::fir_adapt< Numeric, Coeff >::update_lms ( Numeric  err)
inline

Calculate updated taps using LMS algorithm.

Referenced by SPUC::mle< Numeric >::update_taps_lms(), and SPUC::lms_dfe< Numeric, Coeff >::update_taps_lms().

template<class Numeric, class Coeff = double>
void SPUC::fir_adapt< Numeric, Coeff >::update_lms_sign_coeff ( Numeric  err)
inline

Calculate updated taps using LMS algorithm and sign of input.

Member Data Documentation

template<class Numeric, class Coeff = double>
real_type SPUC::fir_adapt< Numeric, Coeff >::u

Adaptation gain.


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