Fast Function Approximation Library
 All Classes Files Functions Typedefs Macros
Public Member Functions | List of all members
TrigonometricPolynomialSlidingWindow Class Reference

This class implements an updatable sliding window least squares polynomial approximation using trigonometric polynomials. More...

#include <TrigonometricPolynomialSlidingWindow.hpp>

Public Member Functions

 TrigonometricPolynomialSlidingWindow (int degree, int windowSize)
 Constructor. More...
 
void init ()
 Initialize sliding window.
 
void restart ()
 Restart sliding window.
 
void update (double y)
 Update sliding window approximation. More...
 
double evalPoly (double x)
 Evaluate polynomial at x. More...
 
std::vector< std::vector
< double > > 
getCoefficients ()
 Get coefficients. More...
 
double getApproximationError ()
 Get approximation error. More...
 

Detailed Description

This class implements an updatable sliding window least squares polynomial approximation using trigonometric polynomials.

See Also
"Erich Fuchs, Tobias Hanning and Oliver Schwarz, 'An Update Algorithm for Fourier Coefficients', 12th European Signal Processing Conference, pp. 1509-1512, Vienna, Austria, 2004"

Constructor & Destructor Documentation

TrigonometricPolynomialSlidingWindow::TrigonometricPolynomialSlidingWindow ( int  degree,
int  windowSize 
)

Constructor.

Parameters
degreeDegree of polynomial approximation
windowSizeSize of sliding window

Member Function Documentation

double TrigonometricPolynomialSlidingWindow::evalPoly ( double  x)

Evaluate polynomial at x.

Parameters
xValue to evaluate polynomial at.
Returns
Evaluation
double TrigonometricPolynomialSlidingWindow::getApproximationError ( )

Get approximation error.

Returns
Approximation error
std::vector< std::vector< double > > TrigonometricPolynomialSlidingWindow::getCoefficients ( )

Get coefficients.

Returns
Vectors of coefficients
void TrigonometricPolynomialSlidingWindow::update ( double  y)

Update sliding window approximation.

Parameters
yValue to update with.

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