naginterfaces.library.fit.dim1_spline_eval¶
- naginterfaces.library.fit.dim1_spline_eval(lamda, c, x)[source]¶
dim1_spline_eval
evaluates a cubic spline from its B-spline representation.For full information please refer to the NAG Library document for e02bb
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/e02/e02bbf.html
- Parameters
- lamdafloat, array-like, shape
must be set to the value of the th member of the complete set of knots, , for .
- cfloat, array-like, shape
The coefficient of the B-spline , for . The remaining elements of the array are not referenced.
- xfloat
The argument at which the cubic spline is to be evaluated.
- Returns
- sfloat
The value of the spline, .
- Raises
- NagValueError
- (errno )
On entry, , and .
Constraint: .
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, .
Constraint: .
- Notes
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_spline_eval
evaluates the cubic spline at a prescribed argument from its augmented knot set , for , (seedim1_spline_knots()
) and from the coefficients , for in its B-spline representationHere , where is the number of intervals of the spline, and denotes the normalized B-spline of degree defined upon the knots . The prescribed argument must satisfy .
It is assumed that , for , and .
If is a point at which knots coincide, is discontinuous at ; in this case, contains the value defined as is approached from the right.
The method employed is that of evaluation by taking convex combinations due to de Boor (1972). For further details of the algorithm and its use see Cox (1972) and Cox and Hayes (1973).
It is expected that a common use of
dim1_spline_eval
will be the evaluation of the cubic spline approximations produced bydim1_spline_knots()
. A generalization ofdim1_spline_eval
which also forms the derivative of isdim1_spline_deriv()
.dim1_spline_deriv()
takes about longer thandim1_spline_eval
.
- References
Cox, M G, 1972, The numerical evaluation of B-splines, J. Inst. Math. Appl. (10), 134–149
Cox, M G, 1978, The numerical evaluation of a spline from its B-spline representation, J. Inst. Math. Appl. (21), 135–143
Cox, M G and Hayes, J G, 1973, Curve fitting: a guide and suite of algorithms for the non-specialist user, NPL Report NAC26, National Physical Laboratory
de Boor, C, 1972, On calculating with B-splines, J. Approx. Theory (6), 50–62