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

◆ bintk()

void bintk ( double  x[],
double  y[],
double  t[],
int  n,
int  k,
double  bcoef[],
double  q[],
double  work[],
int *  info 
)

B-representation of the spline interpolation of order k

Purpose
This routine computes the B-representation (t[], bcoef[], n, k) of the spline of order k which interpolates given data. The spline or any of its derivatives can be evaluated by calls to bvalu.
Parameters
[in]x[]Array x[lx] (lx >= n)
X vector of abscissae, distinct and in increasing order.
[in]y[]Array y[ly] (ly >= n)
Y vector of ordinates.
[in]t[]Array t[lt] (lt >= n + k)
Knot vector.
Since t[0], ..., t[k-1] <= x[0] and t[n], ..., t[n+k-1] >= x[n-1], this leaves only n-k knots (not necessarily x[i] values) interior to [x[0], x[n-1]].
[in]nNumber of data points. (n >= k)
[in]kOrder of the spline. (k >= 1)
[out]bcoef[]Array bcoef[lbcoef] (lbcoef >= n)
B-spline coefficients.
[out]q[]Array q[lq] (lq >= (2*k - 1)*n)
Work array, containing the triangular factorization of the coefficient matrix of the linear system being solved. The coefficients for the interpolant of an additional data set (x[i], yy[i]) (i = 1 to n) with the same abscissa can be obtained by loading yy into bcoef and then executing
  banslv(n, k-1, k-1, 2*k-1, (double (*)[2*k-1])q, bcoef, &info);
[out]work[]Array work[lwork] (lwork >= 2*k)
Work array.
[out]info= 0: Successful exit
= -1: The argument x[] had an illegal value (not distinct or not in increasing order)
= -4: The argument n had an illegal value (n < k)
= -5: The argument k had an illegal value (k < 1)
= 1: Some abscissa was not in the support of the corresponding basis function and the system is singular
= 2: The system of solver detects a singular system although the theoretical conditions for a solution were satisfied
Reference
SLATEC