e02de calculates values of a bicubic spline from its B-spline representation.
Syntax
C# |
---|
public static void e02de( int m, int px, int py, double[] x, double[] y, double[] lamda, double[] mu, double[] c, double[] ff, out int ifail ) |
Visual Basic |
---|
Public Shared Sub e02de ( _ m As Integer, _ px As Integer, _ py As Integer, _ x As Double(), _ y As Double(), _ lamda As Double(), _ mu As Double(), _ c As Double(), _ ff As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void e02de( int m, int px, int py, array<double>^ x, array<double>^ y, array<double>^ lamda, array<double>^ mu, array<double>^ c, array<double>^ ff, [OutAttribute] int% ifail ) |
F# |
---|
static member e02de : m : int * px : int * py : int * x : float[] * y : float[] * lamda : float[] * mu : float[] * c : float[] * ff : float[] * ifail : int byref -> unit |
Parameters
- m
- Type: System..::..Int32On entry: , the number of points at which values of the spline are required.Constraint: .
- px
- Type: System..::..Int32On 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.Constraint: and .
- py
- Type: System..::..Int32On 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.Constraint: and .
- x
- Type: array<System..::..Double>[]()[][]An array of size [m]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.Constraint: and must satisfyand.The spline representation is not valid outside these intervals.
- y
- Type: array<System..::..Double>[]()[][]An array of size [m]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.Constraint: and must satisfyand.The spline representation is not valid outside these intervals.
- lamda
- Type: array<System..::..Double>[]()[][]An array of size [px]On entry: lamda and mu must contain the complete sets of knots and associated with the and variables respectively.Constraint: the knots in each set must be in nondecreasing order, with and .
- mu
- Type: array<System..::..Double>[]()[][]An array of size [px]On entry: lamda and mu must contain the complete sets of knots and associated with the and variables respectively.Constraint: the knots in each set must be in nondecreasing order, with and .
- c
- Type: array<System..::..Double>[]()[][]An array of size []On entry: must contain the coefficient described in [Description], for and .
- ff
- Type: array<System..::..Double>[]()[][]An array of size [m]On exit: contains the value of the spline at the point , for .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
e02de calculates values of the bicubic spline at prescribed points , for , from its augmented knot sets and and from the coefficients , for and , in its B-spline representation
Here and denote normalized cubic B-splines, the former defined on the knots to and the latter on the knots to .
This method may be used to calculate values of a bicubic spline given in the form produced by e01da (E02DAF not in this release) (E02DCF not in this release) (E02DDF not in this release). It is derived from the method B2VRE in Anthony et al. (1982).
References
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
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, , or , or .
- On entry, at least one of the prescribed points lies outside the rectangle defined by , and , .
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.
Parallelism and Performance
None.
Further Comments
Computation time is approximately proportional to the number of points, , at which the evaluation is required.
Example
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.
Example program (C#): e02dee.cs