1 #ifndef ADAPTIVEFILTER_H
2 #define ADAPTIVEFILTER_H
21 namespace ublas = boost::numeric::ublas;
33 gplib::rvec FilterOutput;
37 const unsigned int inputlength;
39 const unsigned int outputlength;
78 AdaptFilter(
const gplib::rvec &Input,
const gplib::rvec &Desired) = 0;
80 virtual void CalcOutput(
const gplib::rvec &Input, gplib::rvec &Output) = 0;
88 #endif // ADAPTIVEFILTER_H
const gplib::rvec & GetEpsilon() const
Return the last estimation error.
Apply an adaptive filter to a time-series.
void SetEpsilon(const gplib::rvec &MyEps)
Possibility for derived classes to set estimation error.
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 d...
unsigned int GetInputLength()
Access function for derived classes for the inputlength.
A generic base class for all types of adaptive filters.
const gplib::rvec & GetFilterOutput() const
Access to the last calculated output (not sure if needed)
virtual void CalcOutput(const gplib::rvec &Input, gplib::rvec &Output)=0
Calculate the filter output given Input.
virtual void AdaptFilter(const gplib::rvec &Input, const gplib::rvec &Desired)=0
Adapt the filter weights given the Input and Desired vectors.
AdaptiveFilter(const int inputsize, const int outputsize)
The constructor needs to know the length of the input and output vectors for memory allocation...
void SetOutput(const gplib::rvec &Out)
Possibility for derived classes to set output.
virtual ~AdaptiveFilter()
unsigned int GetOutputLength()
Access function for derived classes for the outputlength.
virtual void PrintWeights(std::ostream &output)=0
Print the current set of weights to the output stream, has to be implemented in derived class...