LocalGuidance
A library that generates velocity references to follow a path.
rbf::PeriodicRBF1DC3 Class Reference

Function approximation of a periodic function with radial basis functions (polyharmonic splines) with C3 continuity. More...

#include <PeriodicRBF1DC3.hpp>

Inheritance diagram for rbf::PeriodicRBF1DC3:
Inheritance graph

Public Member Functions

 PeriodicRBF1DC3 ()
 Constructor. More...
 
virtual ~PeriodicRBF1DC3 ()
 Destructor. More...
 
virtual void setRBFData (const std::vector< double > &x_input, const std::vector< double > &f_input)
 
virtual void setRBFData (const Eigen::VectorXd &x_input, const Eigen::VectorXd &f_input)
 
virtual double evaluate (double x) const
 
virtual double evaluateFirstDerivative (double x) const
 
virtual double evaluateSecondDerivative (double x) const
 
virtual double evaluateThirdDerivative (double x) const
 
- Public Member Functions inherited from rbf::RBF1D
 RBF1D (void)
 Constructor. More...
 
virtual ~RBF1D (void)
 Destructor. More...
 
int getKnotCount () const
 
virtual double getKnotValue (int idx) const
 
virtual double getKnotPosition (int idx) const
 
virtual double evaluateDerivative (double x, int order) const
 

Additional Inherited Members

- Protected Member Functions inherited from rbf::RBF1D
double getR (double xCenter, double x) const
 
double drdx (double xCenter, double x) const
 
double d2rdx2 (double xCenter, double x) const
 
double d3rdx3 (double xCenter, double x) const
 
virtual double evaluateBasisFunction (double r) const
 
virtual double evaluateBasisFunction (double xCenter, double x) const
 
virtual double dBFdr (double r) const
 
virtual double d2BFdr2 (double r) const
 
virtual double d3BFdr3 (double r) const
 
double dBFdx (double xCenter, double x) const
 
double d2BFdx2 (double xCenter, double x) const
 
double d3BFdx3 (double xCenter, double x) const
 
double Mod (double x, double y) const
 
double wrapToRange (double x, double min, double max) const
 
- Protected Attributes inherited from rbf::RBF1D
bool isInitialized
 true if RFB data was set More...
 
Eigen::VectorXd xInput
 points (knots) that are interpolated More...
 
Eigen::VectorXd fInput
 values of points that are interpolated More...
 
Eigen::VectorXd w
 stacked array of weights for the basis functions and the polynomial More...
 

Detailed Description

Function approximation of a periodic function with radial basis functions (polyharmonic splines) with C3 continuity.

Compute function f(x), so that f(x_i) = f_i. The form of f is: f = sum_i w_i * F_i(r) + a + b*x + c*x*x + d*x*x*x, where F_i are basis functions, one for each (x_i, f_i) pair. The weights w_i, as well as the polynomial coefficients a, b, c and d are computed so that the function interpolates the input data, whereby f(x_0)=f(x_n-1), f'(x_0)=f'(x_n-1), f''(x_0)=f''(x_n-1), and f'''(x_0)=f'''(x_n-1), so that f(x) has C3 continuity The basis function is F_i(r_i) = r_i*r_i*log(r_i) with r_i = (x_i-x)*(x_i-x)

Constructor & Destructor Documentation

rbf::PeriodicRBF1DC3::PeriodicRBF1DC3 ( )

Constructor.

virtual rbf::PeriodicRBF1DC3::~PeriodicRBF1DC3 ( )
virtual

Destructor.

Member Function Documentation

virtual double rbf::PeriodicRBF1DC3::evaluate ( double  x) const
virtual

Evaluates the interpolation function at x, i.e. computes f(x) If x < min(x_input) or x > max(x_input), x is wrapped to the range [min(x_input) max(x_input)).

Parameters
xvalue
Returns
f(x)

Reimplemented from rbf::RBF1D.

virtual double rbf::PeriodicRBF1DC3::evaluateFirstDerivative ( double  x) const
virtual

Evaluates the first derivative of the interpolation function at x, i.e. computes dfdx(x) If x < min(x_input) or x > max(x_input), x is wrapped to the range [min(x_input) max(x_input)).

Parameters
xvalue
Returns
dfdx(x)

Reimplemented from rbf::RBF1D.

virtual double rbf::PeriodicRBF1DC3::evaluateSecondDerivative ( double  x) const
virtual

Evaluates the second derivative of the interpolation function at x, i.e. computes d2fdx2(x) If x < min(x_input) or x > max(x_input), x is wrapped to the range [min(x_input) max(x_input)).

Parameters
xvalue
Returns
d2fdx2(x)

Reimplemented from rbf::RBF1D.

virtual double rbf::PeriodicRBF1DC3::evaluateThirdDerivative ( double  x) const
virtual

Evaluates the third derivative of the interpolation function at x, i.e. computes d3fdx3(x) If x < min(x_input) or x > max(x_input), x is wrapped to the range [min(x_input) max(x_input)).

Parameters
xvalue
Returns
d3fdx3(x)

Reimplemented from rbf::RBF1D.

virtual void rbf::PeriodicRBF1DC3::setRBFData ( const std::vector< double > &  x_input,
const std::vector< double > &  f_input 
)
virtual

Compute function f(x), so that f(x_i) = f_i. The form of f is: f = sum_i w_i * F_i(r) + a + b*x + c*x*x + d*x*x*x, where F_i are basis functions, one for each (x_i, f_i) pair the weights w_i, as well as the polynomial coefficients a, b, c and d are computed so that the function interpolates the input data The basis function is F_i(r_i) = r_i*r_i*log(r_i) with r_i = (x_i-x)*(x_i-x)

Parameters
x_inputthe centers x_i
f_inputthe function values f_i

Reimplemented from rbf::RBF1D.

virtual void rbf::PeriodicRBF1DC3::setRBFData ( const Eigen::VectorXd &  x_input,
const Eigen::VectorXd &  f_input 
)
virtual

Reimplemented from rbf::RBF1D.


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