![]() |
Project
|
#include <RegularSpline1D.h>
Public Member Functions | |
RegularSpline1D ()=default | |
_____________ Constructors / destructors __________________________ | |
~RegularSpline1D ()=default | |
Destructor. | |
void | construct (int32_t numberOfKnots) |
Constructor. Number of knots will be set to at least 5. | |
template<typename T > | |
void | correctEdges (T *data) const |
_______________ Main functionality ________________________ | |
template<typename T > | |
T | getSpline (const int32_t iknot, T f0, T f1, T f2, T f3, float u) const |
Get interpolated value for f(u) using spline at knot "knot_1" and function values at knots {knot_0,knot_1,knot_2,knot_3}. | |
template<typename T > | |
T | getSpline (const T correctedData[], float u) const |
Get interpolated value for f(u) using data array correctedData[getNumberOfKnots()] with corrected edges. | |
int32_t | getNumberOfKnots () const |
Get number of knots. | |
double | knotIndexToU (int32_t index) const |
Get the U-Coordinate depending on the given knot-Index. | |
int32_t | getKnotIndex (float u) const |
The RegularSpline1D class represents one-dimensional spline interpolation on a regular grid. It is a simplification of the IrregularSpline1D class which represents irregular splines. For the description please look at IrregularSpline1D.h .
The class consist of only one member: mNumberOfKnots. Basically, the class is a collection of methods.
Definition at line 34 of file RegularSpline1D.h.
|
default |
_____________ Constructors / destructors __________________________
Default constructor
|
default |
Destructor.
|
inline |
Constructor. Number of knots will be set to at least 5.
====================================================
Constructor
Definition at line 86 of file RegularSpline1D.h.
|
inline |
_______________ Main functionality ________________________
Correction of data values at the both edge knots. It is needed for the fast spline mathematics to work correctly. See explanation at the class comment above.
data | array of function values. It has the size of getNumberOfKnots() |
Definition at line 167 of file RegularSpline1D.h.
|
inline |
Get index of associated knot for a given U coordinate.
Note: U values from the first interval are mapped to the second inrerval. Values from the last interval are mapped to the previous interval.
Definition at line 154 of file RegularSpline1D.h.
|
inline |
Get number of knots.
Definition at line 66 of file RegularSpline1D.h.
|
inline |
Get interpolated value for f(u) using spline at knot "knot_1" and function values at knots {knot_0,knot_1,knot_2,knot_3}.
static method Get interpolated value for f(u) using a spline polynom for [iknot1,iknot2] interval. The polynom is constructed with function values f0,f1,f2,f3 at knots {iknot0,iknot1,iknot2,iknot3} The u value supposed to be inside the [knot1,knot2] region, but also may be any.
f0 = f value at iknot1-1 f1 = f value at iknot1 f2 = f value at iknot1+1 f3 = f value at iknot1+2 u = u value where f(u) is searched for.
Definition at line 93 of file RegularSpline1D.h.
|
inline |
Get interpolated value for f(u) using data array correctedData[getNumberOfKnots()] with corrected edges.
Get interpolated value for f(u) using data array correctedData[getNumberOfKnots()] with corrected edges
Definition at line 135 of file RegularSpline1D.h.
|
inline |
Get the U-Coordinate depending on the given knot-Index.
Definition at line 143 of file RegularSpline1D.h.