- naginterfaces.library.interp.dim1_spline(x, y)¶
dim1_splinedetermines a cubic spline interpolant to a given set of data.
For full information please refer to the NAG Library document for e01ba
- xfloat, array-like, shape
must be set to , the th data value of the independent variable , for .
- yfloat, array-like, shape
must be set to , the th data value of the dependent variable , for .
- lamdafloat, ndarray, shape
The value of , the th knot, for .
- cfloat, ndarray, shape
The coefficient of the B-spline , for . The remaining elements of the array are not used.
- (errno )
On entry, and .
- (errno )
On entry, .
- (errno )
On entry, , and .
In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.
dim1_splinedetermines a cubic spline , defined in the range , which interpolates (passes exactly through) the set of data points , for , where and . Unlike some other spline interpolation algorithms, derivative end conditions are not imposed. The spline interpolant chosen has interior knots , which are set to the values of respectively. This spline is represented in its B-spline form (see Cox (1975)):
where denotes the normalized B-spline of degree , defined upon the knots , and denotes its coefficient, whose value is to be determined by the function.
The use of B-splines requires eight additional knots , , , , , , and to be specified;
dim1_splinesets the first four of these to and the last four to .
The algorithm for determining the coefficients is as described in Cox (1975) except that factorization is used instead of decomposition. The implementation of the algorithm involves setting up appropriate information for the related function
fit.dim1_spline_knotsfollowed by a call of that function. (See
fit.dim1_spline_knotsfor further details.)
Values of the spline interpolant, or of its derivatives or definite integral, can subsequently be computed as detailed in Further Comments.
Cox, M G, 1975, An algorithm for spline interpolation, J. Inst. Math. Appl. (15), 95–108
Cox, M G, 1977, A survey of numerical methods for data and function approximation, The State of the Art in Numerical Analysis, (ed D A H Jacobs), 627–668, Academic Press