|
|
◆ bsplvd()
| void bsplvd |
( |
double |
t[], |
|
|
int |
k, |
|
|
int |
nderiv, |
|
|
double |
x, |
|
|
int |
ileft, |
|
|
int |
ldvnikx, |
|
|
double |
vnikx[], |
|
|
double |
work[], |
|
|
int * |
info |
|
) |
| |
Compute the value and the derivatives of B-spline basis functions
- Purpose
- This routine computes the value and all derivatives of order less than nderiv of all basis functions which do not (possibly) vanish at x.
ileft is input such that t[ileft-1] <= x <= t[ileft]. The following statement produces the proper ileft. interv(t, n+1, x, &ilo, &ileft, &info);
void interv(double xt[], int lxt, double x, int *ilo, int *ileft, int *info) Compute ileft for the input to bsplvd and bsplvn Definition interv.c:101
The output of bsplvd is an array vnikx[j][i] of dimension at least k x nderiv whose columns contain the k nonzero basis functions and their nderiv-1 right derivatives at x, i = 0 to k-1, j = 0 to nderiv-1. These basis functions have indices ileft-k+i, i = 1 to k, k <= ileft <= n. The nonzero part of the i-th basis function lies in (t[i], t[i+k]), i = 0 to n-1). If x = t[ileft] then vnikx contains left limiting values (left derivatives) at t[ileft]. In particular, ileft = n produces left limiting values at the right end point x = t[n]. To obtain left limiting values at t[i], i = k to n, set x = next lower distinct knot, call interv to get ileft, set x = t[i], and then call bsplvd.
- Parameters
-
| [in] | t[] | Array t[lt] (lt >= n + k)
Knot vector of length n + k, where n is number of B-spline basis functions (= sum of knot multiplicities - k). |
| [in] | k | Order of B-spline. (k >= 1) |
| [in] | nderiv | Number of derivatives + 1. (1 <= nderiv <= k) |
| [in] | x | Argument of basis functions. (t[k-1] <= x <= t[n]) |
| [in] | ileft | Integer such that t[ileft-1] <= x <= t[ileft]. |
| [in] | ldvnikx | Leading dimension of the two dimensional array vnikx[][]. (ldvnikx >= k) |
| [out] | vnikx[][] | Array vnikx[lvnikx][ldvnikx] (lvnikx >= nderiv)
Matrix containing the nonzero basis functions at x and their derivatives columnwise |
| [out] | work[] | Array work[lwork] (lwork >= (k + 1)*(k + 2)/2)
Work array. |
| [out] | info | = 0: Successful exit
= -2: The argument k had an illegal value (k < 1)
= -3: The argument nderiv had an illegal value (nderiv < 1 or nderiv > k)
= -6: The argument ldvnikx had an illegal value (ldvnikx < k)
= 1: ileft is not properly set (x < t[ileft-1] or x > t[ileft]) |
- Reference
- SLATEC
|