|
NAG[e02dfc] NAG[nag_2d_spline_eval_rect] - Evaluation of bicubic spline, at a mesh of points
|
|
Calling Sequence
e02dfc(x, y, ff, spline_data, 'mx'=mx, 'my'=my, 'fail'=fail)
nag_2d_spline_eval_rect(. . .)
Parameters
|
x - Vector(1..mx, datatype=float[8]);
y - Vector(1..my, datatype=float[8]);
|
|
|
|
ff - Vector(1.. , datatype=float[8]);
|
|
|
|
spline_data - table;
|
|
|
A Maple table, which should be generated using NAG[Nag_2dSpline], corresponding to the Nag_2dSpline structure.
|
|
On entry: nx must specify the total number of knots associated with the variable . It is such that is the number of interior knots.
|
|
Constraint: . .
|
|
lamda - Vector(datatype=float[8])
|
|
On entry: a pointer to which memory of size nx must be allocated. lamda must contain the complete sets of knots associated with the variable.
|
|
Constraint: the knots must be in non-decreasing order, with . .
|
|
On entry: ny must specify the total number of knots associated with the variable . It is such that is the number of interior knots.
|
|
Constraint: . .
|
|
mu - Vector(datatype=float[8])
|
|
On entry: a pointer to which memory of size ny must be allocated. mu must contain the complete sets of knots associated with the variable.
|
|
Constraint: the knots must be in non-decreasing order, with . .
|
|
c - Vector(datatype=float[8])
|
|
|
'mx'=mx - integer; (optional)
'my'=my - integer; (optional)
|
|
|
Default value: the first dimension of the arrays x, ythe arrays x, y.
|
|
Constraint: and . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_2d_spline_eval_rect (e02dfc) calculates values of a bicubic spline from its B-spline representation. The spline is evaluated at all points on a rectangular grid.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_END_KNOTS_CONS"
On entry, the end knots must satisfy , , .
"NE_INT_ARG_LT"
On entry, mx must not be less than 1: .
"NE_KNOTS_COORD_CONS"
On entry, the end knots and coordinates must satisfy and . , , , .
"NE_NOT_INCREASING"
The sequence lamda is not increasing: , . The sequence mu is not increasing: , .
"NE_NOT_STRICTLY_INCREASING"
The sequence x is not strictly increasing: , . The sequence y is not strictly increasing: , .
|
|
Accuracy
|
|
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.
|
|
Further Comments
|
|
Computation time is approximately proportional to .
|
|
|
Examples
|
|
>
|
mx := 7:
my := 6:
spline_data := NAG:-Nag_2dSpline():
spline_data['nx'] := 11:
spline_data['ny'] := 10:
spline_data['lamda'] := Vector([ 1, 1, 1, 1, 1.3, 1.5, 1.6, 2, 2, 2, 2 ],
datatype=float[8]):
spline_data['mu'] := Vector([ 0, 0, 0, 0, 0.4, 0.7, 1, 1, 1, 1 ],
datatype=float[8]):
spline_data['c'] := Vector( [
1, 1.1333, 1.3667, 1.7, 1.9, 2, 1.2, 1.3333, 1.5667, 1.9, 2.1, 2.2,
1.5833, 1.7167, 1.95, 2.2833, 2.4833, 2.5833, 2.1433, 2.2767, 2.51,
2.8433, 3.0433, 3.1433, 2.8667, 3, 3.2333, 3.5667, 3.7667, 3.8667,
3.4667, 3.6, 3.8333, 4.1667, 4.3667, 4.4667, 4, 4.1333, 4.3667,
4.7, 4.9, 5 ], datatype=float[8]):
x := Vector([1, 1.1, 1.3, 1.4, 1.5, 1.7, 2], datatype=float[8]):
y := Vector([0, 0.2, 0.4, 0.6, 0.8, 1], datatype=float[8]):
ff := Vector(42, datatype=float[8]):
NAG:-e02dfc(x, y, ff, spline_data, 'mx' = mx, 'my' = my):
|
|
|
See Also
|
|
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
e02 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|