Public Member Functions | Private Member Functions | Private Attributes
dmp::FourierApprox Class Reference

Class for linear function approximation with the univariate Fourier basis. More...

#include <fourier_approx.h>

Inheritance diagram for dmp::FourierApprox:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Class for linear function approximation with the univariate Fourier basis.

Definition at line 55 of file fourier_approx.h.


Constructor & Destructor Documentation

Definition at line 49 of file fourier_approx.cpp.

dmp::FourierApprox::FourierApprox ( const std::vector< double > &  w)

Definition at line 71 of file fourier_approx.cpp.


Member Function Documentation

void dmp::FourierApprox::calcFeatures ( double  x) [private]

Calculate the Fourier basis features at point x.

Parameters:
xThe 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.

Parameters:
xThe point at which to evaluate
Returns:
The scalar value of the function at x

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.

Parameters:
XA vector of the domain values of the points
YA 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.

Parameters:
matThe matrix to pseudoinvert
Returns:
The pseudoinverted matrix

Definition at line 119 of file fourier_approx.cpp.


Member Data Documentation

double* dmp::FourierApprox::features [private]

Definition at line 85 of file fourier_approx.h.


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


dmp
Author(s): Scott Niekum
autogenerated on Fri Jan 3 2014 11:19:23