VF_polyinterpolVD_polyinterpolVE_polyinterpol
FunctionPolynomial interpolation of X-Y-table values
Syntax C/C++#include <VFstd.h>
void VF_polyinterpol( fVector Y, fVector X, ui sizex, fVector XTab, fVector YTab, ui sizetab, unsigned deg );
C++ VecObj#include <OptiVec.h>
void vector<T>::polyinterpol( const vector<T>& X, const vector<T>& XTab, const vector<T>& YTab, unsigned deg );
Pascal/Delphiuses VFstd;
procedure VF_polyinterpol( Y, X:fVector; sizex:UIntSize; XTab, YTab:fVector; sizetab:UIntSize; deg:UInt );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_polyinterpol( fVector d_Y, fVector d_X, ui sizex, fVector d_XTab, fVector d_YTab, ui sizetab, unsigned deg );
void VFcu_polyinterpol( fVector h_Y, fVector h_X, ui sizex, fVector h_XTab, fVector h_YTab, ui sizetab, unsigned deg );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_polyinterpol( d_Y, d_X:fVector; sizex:UIntSize; d_XTab, d_YTab:fVector; sizetab:UIntSize; deg:UInt ): IntBool;
procedure VFcu_polyinterpol( h_Y, h_X:fVector; sizex:UIntSize; h_XTab, h_YTab:fVector; sizetab:UIntSize; deg:UInt );
DescriptionFor 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. For each element of X, the routine first locates the appropriate place in the table from which to start the interpolation. The parameter deg denotes the number of points that will be taken into account for the interpolation (this is not the degree of the interpolating polynomial!). Any value between 0 and 2 will be interpreted as meaning linear interpolation. A maximum of 10-point interpolation is possible. deg may not be larger than sizetab−1.
Error handlingTrying to use too many elements for the interpolation (deg > 10) leads to an error message "Not possible with more than 10 elements" and to a program abort. If deg exceeds sizetab−1, an error message "Invalid parameter(s)" is displayed and the program aborted.
No other errors are detected (you have to take care yourself that the XTab values are distinct and that the YTab values are not near the limit of overflowing).
Return valuenone
See alsoVF_ratinterpol,   VF_splineinterpol

VectorLib Table of Contents  OptiVec home