Interface for univariate linear function approximation. More...
#include <function_approx.h>
Public Member Functions | |
virtual double | evalAt (double x)=0 |
Evaluate the function approximator at point x. | |
FunctionApprox () | |
int | getNumBases () |
Returns the number of basis functions. | |
std::vector< double > | getWeights () |
Returns the current weight vector. | |
virtual void | leastSquaresWeights (double *X, double *Y, int n_pts)=0 |
Computes the least squares weights given a set of data points. | |
virtual | ~FunctionApprox () |
Protected Attributes | |
int | n_bases |
std::vector< double > | weights |
Interface for univariate linear function approximation.
Definition at line 50 of file function_approx.h.
dmp::FunctionApprox::FunctionApprox | ( | ) | [inline] |
Definition at line 52 of file function_approx.h.
virtual dmp::FunctionApprox::~FunctionApprox | ( | ) | [inline, virtual] |
Definition at line 53 of file function_approx.h.
virtual double dmp::FunctionApprox::evalAt | ( | double | x | ) | [pure virtual] |
Evaluate the function approximator at point x.
x | The point at which to evaluate |
Implemented in dmp::FourierApprox, dmp::LinearApprox, and dmp::RadialApprox.
int dmp::FunctionApprox::getNumBases | ( | ) | [inline] |
Returns the number of basis functions.
Definition at line 70 of file function_approx.h.
std::vector<double> dmp::FunctionApprox::getWeights | ( | ) | [inline] |
Returns the current weight vector.
Definition at line 75 of file function_approx.h.
virtual void dmp::FunctionApprox::leastSquaresWeights | ( | double * | X, |
double * | Y, | ||
int | n_pts | ||
) | [pure 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 |
Implemented in dmp::FourierApprox, dmp::LinearApprox, and dmp::RadialApprox.
int dmp::FunctionApprox::n_bases [protected] |
Definition at line 78 of file function_approx.h.
std::vector<double> dmp::FunctionApprox::weights [protected] |
Definition at line 79 of file function_approx.h.