VF_natCubSplineInterpol | VD_natCubSplineInterpol | VE_natCubSplineInterpol |
|
Function | Natural cubic-spline interpolation of X-Y-table values |
|
Syntax C/C++ | #include <VFstd.h>
void VF_natCubSplineInterpol(
fVector Y, fVector X, ui sizex, fVector XTab, fVector YTab, ui sizetab ); |
C++ VecObj | #include <OptiVec.h>
void vector<T>::natCubSplineInterpol( const vector<T>& X, const vector<T>& XTab, const vector<T>& YTab ); |
Pascal/Delphi | uses VFstd;
procedure VF_natCubSplineInterpol( Y, X:fVector; sizex:UIntSize; XTab, YTab:fVector; sizetab:UIntSize ); |
|
CUDA function C/C++ | #include <cudaVFstd.h>
int cudaVF_natCubSplineInterpol( fVector d_Y, fVector d_X, ui sizex, fVector d_XTab, fVector d_YTab, ui sizetab );
void VFcu_natCubSplineInterpol( fVector h_Y, fVector h_X, ui sizex, fVector h_XTab, fVector h_YTab, ui sizetab );
|
CUDA function Pascal/Delphi | uses VFstd;
function cudaVF_natCubSplineInterpol( d_Y, d_X:fVector; sizex:UIntSize; d_XTab, d_YTab:fVector; sizetab:UIntSize ): IntBool;
procedure VFcu_natCubSplineInterpol( h_Y, h_X:fVector; sizex:UIntSize; h_XTab, h_YTab:fVector; sizetab:UIntSize );
|
|
Description | For each of the sizex elements of X, the corresponding element of Y is interpolated from the XTab-YTab value pairs. 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.
This function calculates the "natural" cubic-spline interpolation. For general cubic-spline interpolation with specified second derivatives of the YTab values with respect to XTab, call VF_splineinterpol.
The CUDA version of this function is comparably slow, as it has to use the CPU for the calculation of the derivative table. |
|
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). |
|
|
|