XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ bsqad()

void bsqad ( double  t[],
double  bcoef[],
int  n,
int  k,
double  x1,
double  x2,
double *  bquad,
double  work[],
int *  info 
)

Integral of B-representation of B-spline

Purpose
This routine computes the integral on [x1, x2] of a k-th order B-spline using the B-representation (t[], bcoef[], n, k). Orders k as high as 20 are permitted by applying a 2, 6, or 10 point Gauss formula on subintervals of [x1, x2] which are formed by included (distinct) knots. If orders k greater than 20 are needed, use bfqad with f(x) = 1.
Parameters
[in]t[]Array t[lt] (lt >= n + k)
Knot vector.
[in]bcoef()Array bcoef[lbcoef] (lbcoef >= n)
B-spline coefficients.
[in]nNumber of B-spline coefficients. (n = sum of knot multiplicities - k)
[in]kOrder of B-spline. (1 <= k <= 20)
[in]x1Lower end point of quadrature interval. (t[k] <= x1 <= t[n+1])
[in]x2Upper end point of quadrature interval. (t[k] <= x2 <= t[n+1])
[out]bquadIntegral of the B-spline over [x1, x2].
[out]work[]Array work[lwork] (lwork >= 3*k)
Work array.
[out]info= 0: Successful exit
= -3: The argument n had an illegal value (n < k)
= -4: The argument k had an illegal value (k < 1 or k > 20)
= -5: The argument x1 had an illegal value (x1 < t[k-1] or x1 > t[n])
= -6: The argument x2 had an illegal value (x2 < t[k-1] or x2 > t[n])
Reference
SLATEC