This function evaluates a spline, given its B-spline representation.
BSVAL — Value of the spline at X. (Output)
X — Point at which the spline is to be evaluated. (Input)
KORDER — Order of the spline. (Input)
XKNOT — Array of
length KORDER +
NCOEF containing
the knot sequence. (Input)
XKNOT must be
nondecreasing.
NCOEF — Number of B-spline coefficients. (Input)
BSCOEF — Array of length NCOEF containing the B-spline coefficients. (Input)
Generic: BSVAL (X, KORDER, XKNOT, NCOEF, BSCOEF)
Specific: The specific interface names are S_BSVAL and D_BSVAL.
Single: BSVAL (X, KORDER, XKNOT, NCOEF, BSCOEF)
Double: The double precision function name is DBSVAL.
The function BSVAL evaluates a spline (given its B-spline representation) at a specific point. It is a special case of the routine BSDER, which evaluates the derivative of a spline given its B-spline representation. The routine BSDER is based on the routine BVALUE by de Boor (1978, page 144).
Specifically, given the knot vector t, the number of coefficients N, the coefficient vector a, and a point x, BSVAL returns the number
where Bj,k is the j-th B-spline of order k for the knot sequence t. Note that this function routine arbitrarily treats these functions as if they were right continuous near XKNOT(KORDER) and left continuous near XKNOT(NCOEF + 1). Thus, if we have KORDER knots stacked at the left or right end point, and if we try to evaluate at these end points, then we will get the value of the limit from the interior of the interval.
1. Workspace may be explicitly provided, if desired, by use of B2VAL/DB2VAL. The reference is:
CALL B2VAL(X, KORDER, XKNOT, NCOEF, BSCOEF, WK1, WK2, WK3)
The additional arguments are as follows:
WK1 — Work array of length KORDER.
WK2 — Work array of length KORDER.
WK3 — Work array of length KORDER.
2. Informational errors
Type Code
4 4 Multiplicity of the knots cannot exceed the order of the spline.
4 5 The knots must be nondecreasing.
For an example of the use of BSVAL, see IMSL routine BSINT.
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |