| VF_splineinterpol | VD_splineinterpol | VE_splineinterpol |
|
| Function | Cubic-spline interpolation of X-Y-table values with given second derivatives of the table |
|
| Syntax C/C++ | #include <VFstd.h>
void VF_splineinterpol(
fVector Y, fVector X, ui sizex, fVector XTab, fVector YTab, fVector Y2Tab, ui sizetab ); |
| C++ VecObj | #include <OptiVec.h>
void vector<T>::splineinterpol( const vector<T>& X, const vector<T>& XTab, const vector<T>& YTab, const vector<T>& Y2Tab ); |
| Pascal/Delphi | uses VFstd;
procedure VF_splineinterpol( Y, X:fVector; sizex:UInt; XTab, YTab, Y2Tab:fVector; sizetab:UInt ); |
|
| Description | For each of the sizex elements of X, the corresponding element of Y is interpolated from the XTab-YTab value pairs. A table of second derivatives of YTab is needed that has to be generated by a call to VF_splinederiv2 prior to calling VF_splineinterpol. XTab must be ordered (either ascending or descending). All values of XTab must be distinct; otherwise a division by zero may occur and lead to a program abort. sizetab must be greater than or equal to 3.
For a simplified alternative to this function, consider VF_natCubSplineInterpol. |
|
| Error handling | none (you have to take care yourself that the XTab values are distinct and that the YTab values are not near the limit of overflowing). |
|
|
|