GPLIB++
Public Member Functions | Protected Member Functions | List of all members
gplib::RLSCanceller Class Reference

Implements a recursive least-squares adaptive filter, as described in Haykin, p. 443. More...

#include <RLSCanceller.h>

Inheritance diagram for gplib::RLSCanceller:
Inheritance graph
[legend]

Public Member Functions

void SetLambda (const double Mylambda)
 Set the forgetting factor $ \lambda $, usually $ \lambda \ll 1 $. More...
 
double GetLambda ()
 Get the current forgetting factor. More...
 
void SetDelta (const double Mydelta)
 Set the regularization factor. More...
 
double GetDelta ()
 
virtual void AdaptFilter (const gplib::rvec &Input, const gplib::rvec &Desired)
 Adapt the filter weights given the Input and Desired vectors. More...
 
 RLSCanceller (const int inputsize)
 
 RLSCanceller (const int inputsize, const double MyDelta, const double MyLambda)
 
virtual ~RLSCanceller ()
 
- Public Member Functions inherited from gplib::LSSOFilter
virtual void CalcOutput (const gplib::rvec &Input, gplib::rvec &Output)
 The way to calculate the output is the same for all single output filters, we implement it here. More...
 
double CalcOutput (const gplib::rvec &Input)
 For single channel output we can also just return the output as a double. More...
 
const gplib::rvec & GetWeights ()
 Return the current set of weights. More...
 
virtual const gplib::rvec & GetWeightsAsVector ()
 Implement the abstract function from adaptive filter, in this case just another name for GetWeights. More...
 
virtual void PrintWeights (std::ostream &output)
 Print the weights to output stream. More...
 
 LSSOFilter (const int filterlength)
 The constructor only needs the filter length, outputsize for Adaptive filter is 1. More...
 
virtual ~LSSOFilter ()
 
- Public Member Functions inherited from gplib::AdaptiveFilter
const gplib::rvec & GetFilterOutput () const
 Access to the last calculated output (not sure if needed) More...
 
const gplib::rvec & GetEpsilon () const
 Return the last estimation error. More...
 
 AdaptiveFilter (const int inputsize, const int outputsize)
 The constructor needs to know the length of the input and output vectors for memory allocation. More...
 
virtual ~AdaptiveFilter ()
 

Protected Member Functions

const gplib::rmat & GetP ()
 
const gplib::rvec & GetPi ()
 
const gplib::rvec & GetK ()
 
- Protected Member Functions inherited from gplib::LSSOFilter
gplib::rvec & SetWeights ()
 
- Protected Member Functions inherited from gplib::AdaptiveFilter
unsigned int GetInputLength ()
 Access function for derived classes for the inputlength. More...
 
unsigned int GetOutputLength ()
 Access function for derived classes for the outputlength. More...
 
void SetEpsilon (const gplib::rvec &MyEps)
 Possibility for derived classes to set estimation error. More...
 
void SetOutput (const gplib::rvec &Out)
 Possibility for derived classes to set output. More...
 

Detailed Description

Implements a recursive least-squares adaptive filter, as described in Haykin, p. 443.

The RLS filter is a more eeffective, but computationally much more expensive version of the LMS filter.

Definition at line 16 of file RLSCanceller.h.

Constructor & Destructor Documentation

gplib::RLSCanceller::RLSCanceller ( const int  inputsize)

Definition at line 14 of file RLSCanceller.cpp.

gplib::RLSCanceller::RLSCanceller ( const int  inputsize,
const double  MyDelta,
const double  MyLambda 
)

Definition at line 21 of file RLSCanceller.cpp.

gplib::RLSCanceller::~RLSCanceller ( )
virtual

Definition at line 29 of file RLSCanceller.cpp.

Member Function Documentation

void gplib::RLSCanceller::AdaptFilter ( const gplib::rvec &  Input,
const gplib::rvec &  Desired 
)
virtual

Adapt the filter weights given the Input and Desired vectors.

Implements gplib::AdaptiveFilter.

Reimplemented in gplib::AMRLSCanceller.

Definition at line 33 of file RLSCanceller.cpp.

References gplib::AdaptiveFilter::GetEpsilon(), gplib::AdaptiveFilter::GetFilterOutput(), gplib::AdaptiveFilter::SetEpsilon(), and gplib::LSSOFilter::SetWeights().

Referenced by gplib::AMRLSCanceller::AdaptFilter().

double gplib::RLSCanceller::GetDelta ( )
inline

Definition at line 53 of file RLSCanceller.h.

const gplib::rvec& gplib::RLSCanceller::GetK ( )
inlineprotected

Definition at line 33 of file RLSCanceller.h.

Referenced by gplib::AMRLSCanceller::AdaptFilter().

double gplib::RLSCanceller::GetLambda ( )
inline

Get the current forgetting factor.

Definition at line 44 of file RLSCanceller.h.

Referenced by gplib::AMRLSCanceller::AdaptFilter().

const gplib::rmat& gplib::RLSCanceller::GetP ( )
inlineprotected

Definition at line 25 of file RLSCanceller.h.

Referenced by gplib::AMRLSCanceller::AdaptFilter().

const gplib::rvec& gplib::RLSCanceller::GetPi ( )
inlineprotected

Definition at line 29 of file RLSCanceller.h.

void gplib::RLSCanceller::SetDelta ( const double  Mydelta)
inline

Set the regularization factor.

Definition at line 49 of file RLSCanceller.h.

void gplib::RLSCanceller::SetLambda ( const double  Mylambda)
inline

Set the forgetting factor $ \lambda $, usually $ \lambda \ll 1 $.

Definition at line 39 of file RLSCanceller.h.

Referenced by gplib::AMRLSCanceller::AdaptFilter().


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