GPLIB++
Public Member Functions | Protected Member Functions | Friends | List of all members
gplib::AdaptiveFilter Class Referenceabstract

A generic base class for all types of adaptive filters. More...

#include <AdaptiveFilter.h>

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

Public Member Functions

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...
 
virtual void PrintWeights (std::ostream &output)=0
 Print the current set of weights to the output stream, has to be implemented in derived class. More...
 
virtual const gplib::rvec & GetWeightsAsVector ()=0
 We can always convert the weights to some sort of vector, the details have to be implemented in the derived class. More...
 
virtual void AdaptFilter (const gplib::rvec &Input, const gplib::rvec &Desired)=0
 Adapt the filter weights given the Input and Desired vectors. More...
 
virtual void CalcOutput (const gplib::rvec &Input, gplib::rvec &Output)=0
 Calculate the filter output given Input. 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

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...
 

Friends

class ApplyFilter
 

Detailed Description

A generic base class for all types of adaptive filters.

The class AdaptiveFilter provides a unified interface for various types of adaptive filters and storage for some quantities that are common to all of them. Ideally this should facilitate transparent use of all filters in any program or routine. See, for example, mtuadaptive.cpp. We assume that the filter length and number of output points is constant for the life of the object.

Definition at line 29 of file AdaptiveFilter.h.

Constructor & Destructor Documentation

gplib::AdaptiveFilter::AdaptiveFilter ( const int  inputsize,
const int  outputsize 
)

The constructor needs to know the length of the input and output vectors for memory allocation.

Definition at line 6 of file AdaptiveFilter.cpp.

gplib::AdaptiveFilter::~AdaptiveFilter ( )
virtual

Definition at line 11 of file AdaptiveFilter.cpp.

Member Function Documentation

virtual void gplib::AdaptiveFilter::AdaptFilter ( const gplib::rvec &  Input,
const gplib::rvec &  Desired 
)
pure virtual
virtual void gplib::AdaptiveFilter::CalcOutput ( const gplib::rvec &  Input,
gplib::rvec &  Output 
)
pure virtual

Calculate the filter output given Input.

Implemented in gplib::NeuralNetwork, gplib::IterDecon, gplib::LSSOFilter, and gplib::WienerFilter.

Referenced by gplib::ApplyFilter::FilterData().

const gplib::rvec& gplib::AdaptiveFilter::GetEpsilon ( ) const
inline
const gplib::rvec& gplib::AdaptiveFilter::GetFilterOutput ( ) const
inline

Access to the last calculated output (not sure if needed)

Definition at line 63 of file AdaptiveFilter.h.

Referenced by gplib::LMSCanceller::AdaptFilter(), gplib::RLSCanceller::AdaptFilter(), and gplib::NeuralNetwork::AdaptFilter().

unsigned int gplib::AdaptiveFilter::GetInputLength ( )
inlineprotected

Access function for derived classes for the inputlength.

Definition at line 42 of file AdaptiveFilter.h.

Referenced by gplib::LMSCanceller::AdaptFilter(), and gplib::ApplyFilter::FilterData().

unsigned int gplib::AdaptiveFilter::GetOutputLength ( )
inlineprotected

Access function for derived classes for the outputlength.

Definition at line 47 of file AdaptiveFilter.h.

Referenced by gplib::LMSCanceller::AdaptFilter(), gplib::ApplyFilter::AddReferenceChannel(), and gplib::ApplyFilter::FilterData().

virtual const gplib::rvec& gplib::AdaptiveFilter::GetWeightsAsVector ( )
pure virtual

We can always convert the weights to some sort of vector, the details have to be implemented in the derived class.

Implemented in gplib::NeuralNetwork, gplib::LSSOFilter, and gplib::IterDecon.

Referenced by gplib::ApplyFilter::FilterData().

virtual void gplib::AdaptiveFilter::PrintWeights ( std::ostream &  output)
pure virtual

Print the current set of weights to the output stream, has to be implemented in derived class.

Implemented in gplib::NeuralNetwork, gplib::LSSOFilter, gplib::IterDecon, and gplib::WienerFilter.

void gplib::AdaptiveFilter::SetEpsilon ( const gplib::rvec &  MyEps)
inlineprotected

Possibility for derived classes to set estimation error.

Definition at line 52 of file AdaptiveFilter.h.

Referenced by gplib::LMSCanceller::AdaptFilter(), gplib::RLSCanceller::AdaptFilter(), and gplib::NeuralNetwork::AdaptFilter().

void gplib::AdaptiveFilter::SetOutput ( const gplib::rvec &  Out)
inlineprotected

Possibility for derived classes to set output.

Definition at line 57 of file AdaptiveFilter.h.

Referenced by gplib::WienerFilter::CalcOutput(), gplib::LSSOFilter::CalcOutput(), gplib::IterDecon::CalcOutput(), and gplib::NeuralNetwork::CalcOutput().

Friends And Related Function Documentation

friend class ApplyFilter
friend

Definition at line 84 of file AdaptiveFilter.h.


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