XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Bvalue()

Function Bvalue ( T() As  Double,
A() As  Double,
N As  Long,
K As  Long,
Ideriv As  Long,
X As  Double,
Inbv As  Long,
Info As  Long 
)

Evaluation of function or derivative value for B-representation of B-spline

Purpose
This routine evaluates the B-representation (T(), A(), N, K) of a B-spline at X for the function value on Ideriv = 0 or any of its derivatives on Ideriv = 1, 2, ..., K-1. Right limiting values (right derivatives) are returned except at the right end point X = T(N) where left limiting values are computed. The spline is defined on T(K-1) <= X <= T(N). Bvalue returns a fatal error when X is outside of this interval.
To compute left derivatives or left limiting values at a knot T(i), replace N by i-1 and set X = T(i), i = K to N.
Returns
Double
Value of the Ideriv-th derivative at X.
Parameters
[in]T()Array T(LT - 1) (LT >= N + K)
Knot vector.
[in]A()Array A(LA - 1) (LA >= N)
B-spline coefficient array.
[in]NNumber of B-spline coefficients. (N = sum of knot multiplicities - K)
[in]KOrder of the B-spline. (K >= 1)
[in]IderivOrder of the derivative. (0 <= Ideriv <= K - 1)
If Ideriv = 0, returns the B-spline value.
[in]XArgument x. (T(K-1) <= X <= T(N))
[in,out]InbvAn initialization parameter.
[in] Must be set to 1 when the first time Bvalu is called.
[out] Information for efficient processing after the initial call and Inbv must not be changed by the user. Distinct splines require distinct Inbv parameters.
[out]Info= 0: Successful exit.
= -1: The argument T() is invalid.
= -2: The argument A() is invalid.
= -3: The argument N had an illegal value. (N < K)
= -4: The argument K had an illegal value. (K < 1)
= -5: The argument Ideriv had an illegal value. (Ideriv < 0 or Ideriv >= K)
= -6: The argument X had an illegal value. (X < T(K-1) or X > T(N))
= 1: A left limiting value cannot be obtained at T(K-1).
Reference
SLATEC
Example Program
See example of Bint4.