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

Base class for least squares filter with a single output value. More...

#include <LSSOFilter.h>

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

Public Member Functions

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...
 
virtual void AdaptFilter (const gplib::rvec &Input, const gplib::rvec &Desired)=0
 Adapt the filter weights given the Input and Desired vectors. 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

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

Base class for least squares filter with a single output value.


Base class for Least-Square filters with a single output value currently used for LMS and RLS filters, implements all virtual functions from AdaptiveFilters apart from AdaptFilter, which depends on the functionality of the individual filter

Definition at line 20 of file LSSOFilter.h.

Constructor & Destructor Documentation

gplib::LSSOFilter::LSSOFilter ( const int  filterlength)

The constructor only needs the filter length, outputsize for Adaptive filter is 1.

Definition at line 9 of file LSSOFilter.cpp.

gplib::LSSOFilter::~LSSOFilter ( )
virtual

Definition at line 16 of file LSSOFilter.cpp.

Member Function Documentation

void gplib::LSSOFilter::CalcOutput ( const gplib::rvec &  Input,
gplib::rvec &  Output 
)
virtual

The way to calculate the output is the same for all single output filters, we implement it here.

Implements gplib::AdaptiveFilter.

Definition at line 28 of file LSSOFilter.cpp.

References gplib::AdaptiveFilter::SetOutput().

Referenced by CalcOutput().

double gplib::LSSOFilter::CalcOutput ( const gplib::rvec &  Input)
inline

For single channel output we can also just return the output as a double.

Definition at line 34 of file LSSOFilter.h.

References CalcOutput().

const gplib::rvec& gplib::LSSOFilter::GetWeights ( )
inline
virtual const gplib::rvec& gplib::LSSOFilter::GetWeightsAsVector ( )
inlinevirtual

Implement the abstract function from adaptive filter, in this case just another name for GetWeights.

Implements gplib::AdaptiveFilter.

Definition at line 46 of file LSSOFilter.h.

void gplib::LSSOFilter::PrintWeights ( std::ostream &  output)
virtual

Print the weights to output stream.

Implements gplib::AdaptiveFilter.

Definition at line 20 of file LSSOFilter.cpp.

gplib::rvec& gplib::LSSOFilter::SetWeights ( )
inlineprotected

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