GPLIB++
|
#include <WienerInterpolator.h>
Public Member Functions | |
double | GetXms () const |
Return the prediction error. More... | |
virtual void | AdaptFilter (const gplib::rvec &Input, const gplib::rvec &Desired) |
Calculate the prediction coefficients, the contents of Desired are ignored, this function has to be implemented in the filter class hieraychy. More... | |
gplib::rvec | CalcCoefficients (const gplib::rvec &Input) |
A more convenient method to get the prediction coefficients, but unique to this class. More... | |
WienerInterpolator (const int filterlength) | |
The constructor needs to know the filterlength. More... | |
virtual | ~WienerInterpolator () |
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 () |
Additional Inherited Members | |
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... | |
WienerInterpolator implements a linear prediction filter as described in Numerical Recipes, p. 566 , it uses the autocorrelation structure of the input data to predict the next sample Although it does not work exactly like the adaptive filters it is part of the class hierachy for now. The prediction coefficients are stored as Weights, but in opposite order to NR memcof, so they can be immediately used for prediction
Definition at line 22 of file WienerInterpolator.h.
gplib::WienerInterpolator::WienerInterpolator | ( | const int | filterlength | ) |
The constructor needs to know the filterlength.
Definition at line 9 of file WienerInterpolator.cpp.
|
virtual |
Definition at line 14 of file WienerInterpolator.cpp.
|
virtual |
Calculate the prediction coefficients, the contents of Desired are ignored, this function has to be implemented in the filter class hieraychy.
Implements gplib::AdaptiveFilter.
Definition at line 18 of file WienerInterpolator.cpp.
References gplib::LSSOFilter::GetWeights(), gplib::LSSOFilter::SetWeights(), and size.
Referenced by CalcCoefficients(), and main().
|
inline |
A more convenient method to get the prediction coefficients, but unique to this class.
Definition at line 37 of file WienerInterpolator.h.
References AdaptFilter(), and gplib::LSSOFilter::GetWeights().
|
inline |
Return the prediction error.
Definition at line 29 of file WienerInterpolator.h.