#include <NaturalCubicSplineInterpolator.h>
Inheritance diagram for O_SESSAME::NaturalCubicSplineInterpolator:
Works for either a single function, or Vector of functions (such as interpolating a state)
Definition at line 24 of file NaturalCubicSplineInterpolator.h.
Public Member Functions | |
NaturalCubicSplineInterpolator () | |
Creates an empty natural cubic spline interpolation. | |
NaturalCubicSplineInterpolator (const Vector &_inputPoints, const Matrix &_outputPoints) | |
Creates a natural cubic spline interpolation. | |
virtual void | Interpolate (const Vector &_timePoints, const Matrix &_dataPoints) |
Creates an interpolation from the vector of time points and matrix of corresponding data points. | |
virtual Vector | Evaluate (const double &_inputPoint) |
Evaluate interpolation curve at a specified time. | |
virtual int | GetNumberDataPoints () |
Returns the number of data points required for interpolation. | |
virtual NaturalCubicSplineInterpolator * | NewPointer () |
Return a pointer to a new instance of a natural cubic spline interpolator type. | |
virtual NaturalCubicSplineInterpolator * | Clone () |
Return a pointer to a copy of the natural cubic spline interpolator instance. | |
virtual bool | GetValid () |
Returns whether the current interpolation parameters are valid. | |
Protected Member Functions | |
void | BuildNaturalCubicSplineInterpolation (const double &_x1, const double &_y1, const double &_x2, const double &_y2, double &_Slope, double &_Offset) |
Computes the parameters of the natural cubic spline interpolation given the data points. | |
virtual void | SetNumberDataPoints (const int &_numberDataPoints) |
Doesn't do anything for linear interpolator since there are always only 2 data points. | |
virtual void | SetValid (const bool &_newValidValue) |
Sets the validity value of the interpolation parameters. | |
Private Attributes | |
int | m_NumDataPoints |
Number of data points used for interpolation, should always be 2 for linear interpolation. | |
int | m_NumElements |
Number of elements in the state vector. | |
Matrix | m_Acoeff |
Matrix | m_Bcoeff |
Matrix | m_Ccoeff |
Matrix | m_Dcoeff |
Vector | m_tempOutput |
|
Creates an empty natural cubic spline interpolation.
Definition at line 15 of file NaturalCubicSplineInterpolator.cpp. |
|
Creates a natural cubic spline interpolation.
Definition at line 20 of file NaturalCubicSplineInterpolator.cpp. |
|
Creates an interpolation from the vector of time points and matrix of corresponding data points.
Implements O_SESSAME::Interpolator. Definition at line 29 of file NaturalCubicSplineInterpolator.cpp. |
|
Evaluate interpolation curve at a specified time. Output = m_Slope * _inputPoint + m_Offset
Implements O_SESSAME::Interpolator. Definition at line 50 of file NaturalCubicSplineInterpolator.cpp. |
|
Returns the number of data points required for interpolation. the number of data points is the number of X-values (time) required to interpolate.
Implements O_SESSAME::Interpolator. Definition at line 59 of file NaturalCubicSplineInterpolator.h. |
|
Return a pointer to a new instance of a natural cubic spline interpolator type. This is used to request memory for a new instance of a NaturalCubicSplineInterpolator. It is necessary when attempting to get a pointer from the abstract data type Interpolator and the actual representation type isn't known.
Implements O_SESSAME::Interpolator. Definition at line 67 of file NaturalCubicSplineInterpolator.cpp. |
|
Return a pointer to a copy of the natural cubic spline interpolator instance. This is used to request memory for a copy of this instance of NaturalCubicSplineInterpolator. It is necessary when attempting to get a pointer from the abstract data type Interpolator and the actual representation type isn't known.
Implements O_SESSAME::Interpolator. Definition at line 72 of file NaturalCubicSplineInterpolator.cpp. |
|
Computes the parameters of the natural cubic spline interpolation given the data points.
Definition at line 62 of file NaturalCubicSplineInterpolator.cpp. |
|
Doesn't do anything for linear interpolator since there are always only 2 data points.
Definition at line 86 of file NaturalCubicSplineInterpolator.h. |
|
Returns whether the current interpolation parameters are valid.
Definition at line 116 of file Interpolator.h. |
|
Sets the validity value of the interpolation parameters.
Definition at line 122 of file Interpolator.h. |
|
Number of data points used for interpolation, should always be 2 for linear interpolation.
Definition at line 90 of file NaturalCubicSplineInterpolator.h. |
|
Number of elements in the state vector. Used to determine how many linear interpolations there are per data set. Definition at line 92 of file NaturalCubicSplineInterpolator.h. |
|
Definition at line 94 of file NaturalCubicSplineInterpolator.h. |
|
Definition at line 95 of file NaturalCubicSplineInterpolator.h. |
|
Definition at line 96 of file NaturalCubicSplineInterpolator.h. |
|
Definition at line 97 of file NaturalCubicSplineInterpolator.h. |
|
Definition at line 99 of file NaturalCubicSplineInterpolator.h. |