|
NAG[e02bdc] NAG[nag_1d_spline_intg] - Evaluation of fitted cubic spline, definite integral
|
|
Calling Sequence
e02bdc(spline_data, integral, 'fail'=fail)
nag_1d_spline_intg(. . .)
Parameters
|
spline_data - table;
|
|
|
A Maple table, which should be generated using NAG[Nag_Spline], corresponding to the Nag_Spline structure.
|
|
Constraint: . .
|
|
lamda - Vector(datatype=float[8])
|
|
Constraint: the must be in non-decreasing order with and satisfy
|
|
c - Vector(datatype=float[8])
|
|
|
integral - assignable;
|
|
|
Note: On exit the variable integral will have a value of type float.
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_1d_spline_intg (e02bdc) computes the definite integral of a cubic spline from its B-spline representation.
|
|
Description
|
|
nag_1d_spline_intg (e02bdc) computes the definite integral of the cubic spline between the limits and , where and are respectively the lower and upper limits of the range over which is defined. It is assumed that is represented in terms of its B-spline coefficients , for and (augmented) ordered knot set , for , with , for ,2,3,4 and , for , (see e02bac (nag_1d_spline_fit_knots)), i.e.,
Here , is the number of intervals of the spline and denotes the normalized B-spline of degree 3 (order 4) defined upon the knots .
The method employed uses the formula given in Section 3 of Cox (1975a).
nag_1d_spline_intg (e02bdc) can be used to determine the definite integrals of cubic spline fits and interpolants produced by e02bac (nag_1d_spline_fit_knots), e01bac (nag_1d_spline_interpolant) and e02bec (nag_1d_spline_fit).
|
|
Accuracy
|
|
The rounding errors are such that the computed value of the integral is exact for a slightly perturbed set of B-spline coefficients differing in a relative sense from those supplied by no more than machine precision.
|
|
|
Examples
|
|
>
|
spline_data := NAG:-Nag_Spline():
spline_data['n'] := 14:
spline_data['lamda'] := Vector([ 0, 0, 0, 0, 1, 3, 3, 3, 4, 4, 6, 6, 6, 6 ],
datatype=float[8]):
spline_data['c'] := Vector([ 10, 12, 13, 15, 22, 26, 24, 18, 14, 12 ],
datatype=float[8]):
NAG:-e02bdc(spline_data, integral):
|
|
|