|
|
◆ bsplvn()
| void bsplvn |
( |
double |
t[], |
|
|
int |
jhigh, |
|
|
int |
k, |
|
|
int |
index, |
|
|
double |
x, |
|
|
int |
ileft, |
|
|
double |
vnikx[], |
|
|
double |
work[], |
|
|
int * |
iwork, |
|
|
int * |
info |
|
) |
| |
Compute the value of B-spline basis functions
- Purpose
- This routine computes the value of all (possibly) nonzero basis functions at x of order max(jhigh, (j+1)*(index-1)), where t[k-1] <= x <= t[n] and j = iwork is set to 1 inside the routine on the first call when index = 1.
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
bsplvn computes using the basic algorithm needed in bsplvd. If only basis functions are desired, setting jhigh = k and index = 1 can be faster than calling bsplvd. but extra coding is required for derivatives (index = 2) and bsplvd is set up for this purpose. Left limiting values are set up as described in 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] | jhigh | Order of B-spline to be computed. (1 <= jhigh <= k) |
| [in] | k | Highest possible order. (k >= 1) |
| [in] | index | = 1: The computation starts from scratch and the entire B-spline values of orders 1, 2, ..., jhigh is generated order by order.
= 2: Only the B-spline values of order j+1, j+2, ..., jhigh are generated. The previous entry with work[] and iwork values for order j have to be saved. |
| [in] | x | Argument of basis functions. (t[k-1] <= x <= t[n]) |
| [in] | ileft | Integer such that t[ileft-1] <= x <= t[ileft]. |
| [out] | vnikx[] | Array vnikx[lvnikx] (lvnikx >= k)
Values of basis functions. |
| [out] | work[] | Array work[lwork] (lwork >= 2*k)
Work array.
Both work[] and iwork contain information necessary to continue for index = 2. When index = 1 exclusively, these are scratch variables and can be used for other purposes. |
| [out] | iwork | Work variable. |
| [out] | info | = 0: Successful exit
= -2: The argument jhigh had an illegal value (jhigh < 1 or jhigh > k)
= -3: The argument k had an illegal value (k < 1)
= -4: The argument index had an illegal value (index != 1 and index != 2)
= 1: ileft is not properly set (x < t[ileft-1] or x > t[ileft]) |
- Reference
- SLATEC
|