naginterfaces.library.fit.dim1_​spline_​integ

naginterfaces.library.fit.dim1_spline_integ(lamda, c)[source]

dim1_spline_integ computes the definite integral of a cubic spline from its B-spline representation.

For full information please refer to the NAG Library document for e02bd

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e02/e02bdf.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.

Returns
dintfloat

The value of the definite integral of between the limits and , where and .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, , and .

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_integ 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 and , for , (see dim1_spline_knots()), i.e.,

Here , is the number of intervals of the spline and denotes the normalized B-spline of degree (order ) defined upon the knots .

The method employed uses the formula given in Section 3 of Cox (1975).

dim1_spline_integ can be used to determine the definite integrals of cubic spline fits and interpolants produced by dim1_spline_knots().

References

Cox, M G, 1975, An algorithm for spline interpolation, J. Inst. Math. Appl. (15), 95–108