Anthony G T, Cox M G and Hayes J G (1982) DASL – Data Approximation Subroutine Library National Physical Laboratory
Cox M G (1978) The numerical evaluation of a spline from its B-spline representation J. Inst. Math. Appl.21 135–143
1: – IntegerInput
On entry: , the number of points at which values of the spline are required.
2: – IntegerInput
3: – IntegerInput
On entry: px and py must specify the total number of knots associated with the variables and respectively. They are such that and are the corresponding numbers of interior knots.
4: – Real (Kind=nag_wp) arrayInput
5: – Real (Kind=nag_wp) arrayInput
On entry: x and y must contain
and , for , respectively. These are the coordinates of the points at which values of the spline are required. The order of the points is immaterial.
and must satisfy
The spline representation is not valid outside these intervals
6: – Real (Kind=nag_wp) arrayInput
7: – Real (Kind=nag_wp) arrayInput
On entry: lamda and mu must contain the complete sets of knots and associated with the and variables respectively.
the knots in each set must be in nondecreasing order, with and .
8: – Real (Kind=nag_wp) arrayInput
On entry: must contain the coefficient described in Section 3, for and .
9: – Real (Kind=nag_wp) arrayOutput
On exit: contains the value of the spline at the point , for .
10: – Real (Kind=nag_wp) arrayWorkspace
11: – Integer arrayWorkspace
12: – IntegerInput/Output
On entry: ifail must be set to , . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value is recommended. If the output of error messages is undesirable, then the value is recommended. Otherwise, if you are not familiar with this argument, the recommended value is . When the value is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, the knots in array lamda, or those in array mu, are not in nondecreasing order, or , or .
On entry, at least one of the prescribed points lies outside the rectangle defined by , and , .
An unexpected error has been triggered by this routine. Please
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.
The method used to evaluate the B-splines is numerically stable, in the sense that each computed value of can be regarded as the value that would have been obtained in exact arithmetic from slightly perturbed B-spline coefficients. See Cox (1978) for details.
Parallelism and Performance
e02def is not threaded in any implementation.
Computation time is approximately proportional to the number of points, , at which the evaluation is required.
This program reads in knot sets and , and a set of bicubic spline coefficients . Following these are a value for and the coordinates , for , at which the spline is to be evaluated.