Class for linear function approximation with the univariate Fourier basis. More...
#include <fourier_approx.h>

| Public Member Functions | |
| virtual double | evalAt (double x) | 
| Evaluate the function approximator at point x. | |
| FourierApprox (int order) | |
| FourierApprox (const std::vector< double > &w) | |
| virtual void | leastSquaresWeights (double *X, double *Y, int n_pts) | 
| Computes the least squares weights given a set of data points. | |
| virtual | ~FourierApprox () | 
| Private Member Functions | |
| void | calcFeatures (double x) | 
| Calculate the Fourier basis features at point x. | |
| Eigen::MatrixXd | pseudoinverse (Eigen::MatrixXd mat) | 
| Calculate the Moore-Penrose pseudoinverse of a matrix using SVD. | |
| Private Attributes | |
| double * | features | 
Class for linear function approximation with the univariate Fourier basis.
Definition at line 55 of file fourier_approx.h.
| dmp::FourierApprox::FourierApprox | ( | int | order | ) | 
Definition at line 49 of file fourier_approx.cpp.
| dmp::FourierApprox::FourierApprox | ( | const std::vector< double > & | w | ) | 
| dmp::FourierApprox::~FourierApprox | ( | ) |  [virtual] | 
Definition at line 71 of file fourier_approx.cpp.
| void dmp::FourierApprox::calcFeatures | ( | double | x | ) |  [private] | 
Calculate the Fourier basis features at point x.
| x | The point at which to get features | 
Definition at line 111 of file fourier_approx.cpp.
| double dmp::FourierApprox::evalAt | ( | double | x | ) |  [virtual] | 
Evaluate the function approximator at point x.
| x | The point at which to evaluate | 
Implements dmp::FunctionApprox.
Definition at line 77 of file fourier_approx.cpp.
| void dmp::FourierApprox::leastSquaresWeights | ( | double * | X, | 
| double * | Y, | ||
| int | n_pts | ||
| ) |  [virtual] | 
Computes the least squares weights given a set of data points.
| X | A vector of the domain values of the points | 
| Y | A vector of the target values of the points | 
Implements dmp::FunctionApprox.
Definition at line 89 of file fourier_approx.cpp.
| MatrixXd dmp::FourierApprox::pseudoinverse | ( | Eigen::MatrixXd | mat | ) |  [private] | 
Calculate the Moore-Penrose pseudoinverse of a matrix using SVD.
| mat | The matrix to pseudoinvert | 
Definition at line 119 of file fourier_approx.cpp.
| double* dmp::FourierApprox::features  [private] | 
Definition at line 85 of file fourier_approx.h.