FunctionGenerate a second-derivative table from an X-Y-table to be used for cubic-spline interpolation.
Syntax C/C++#include <VFstd.h>
void VF_splinederiv2( fVector Y2, fVector XTab, fVector YTab, ui size, int specify, float Yp0, float Ypn );
C++ VecObj#include <OptiVec.h>
void vector<T>::splinederiv2( const vector<T>& XTab, const vector<T>& YTab, int specify, T Yp0, T Ypn );
Pascal/Delphiuses VFstd;
procedure VF_splinederiv2( Y2, XTab, YTab:fVector; size:UIntSize; specify:IntBool; Yp0, Ypn:Single );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_splinederiv2( fVector d_Y2, fVector d_XTab, fVector d_YTab, ui size, int specify, float Yp0, float Ypn );
int cusdVF_splinederiv2( fVector d_Y2, fVector d_XTab, fVector d_YTab, ui size, int specify, float *d_Yp0, float *d_Ypn );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_splinederiv2( d_Y2, d_XTab, d_YTab:fVector; size:UIntSize; specify:IntBool; Yp0, Ypn:Single );
function cusdVF_splinederiv2( d_Y2, d_XTab, d_YTab:fVector; size:UIntSize; specify:IntBool; d_Yp0, d_Ypn:PSingle );
DescriptionA table of second derivatives of YTab is generated to be used for cubic-spline interpolation with VF_splineinterpol. In order to get a unique solution, two additional conditions have to be specified. Setting specify to FALSE (0) yields the "natural cubic spline" with Y2 being set to zero at both end-points; in this case, Yp0 and Ypn have no influence. Setting specify to TRUE (1) yields Y2 calculated in such a way that the first(!) derivative at the zero'th and at the last position equals Yp0 and Ypn, resp.

CUDA versions only: These functions are very slow, as the actual calculation of the derivative table is performed on the CPU rather than on the GPU. This is also the reason why there are no V?cu_ versions.

Error handlingnone
Return valuenone
See alsoVF_splineinterpol

VectorLib Table of Contents  OptiVec home