C Library Functions  - splint (3)

from * a practical guide to splines * by c. de boor
calls bsplvb, banfac/slv

   splint  produces the b-spline coeff.s  bcoef  of the spline of order
   k  with knots  t(i), i=1,..., n + k , which takes on the value
   gtau(i) at  tau(i), i=1,..., n .

****** i n p u t ******
tau.....array of length
  n , containing data point abscissae.
a s s u m p t i o n . . .
  tau is strictly increasing
gtau.....corresponding array of length
  n , containing data point or- dinates
t.....knot sequence, of length
  n+k
n.....number of data points and dimension of spline space
  s(k,t) k.....order of spline
****** o u t p u t ******
q.....array of size
  (2*k-1)*n , containing the triangular factoriz- ation of the coefficient matrix of the linear system for the b- coefficients of the spline interpolant. the b-coeffs for the interpolant of an additional data set
(tau(i),htau(i)), i=1,...,n
  with the same data abscissae can be obtained without going through all the calculations in this
routine, simply by loading
  htau into bcoef and then execut-
ing the
  call banslv ( q, 2*k-1, n, k-1, k-1, bcoef )
bcoef.....the b-coefficients of the interpolant, of length
iflag.....an integer indicating success (= 1)
  or failure (= 2) the linear system to be solved is (theoretically) invertible if and only if
t(i) .lt. tau(i) .lt. t(i+k),
  all i.
violation of this condition is certain to lead to
  iflag = 2 .
****** m e t h o d ******
the i-th equation of the linear system
  a*bcoef = b for the b-co-
effs of the interpolant enforces interpolation at
  tau(i), i=1,...,n.
hence, b(i) = gtau(i), all i, and a is a band matrix with 2k-1 bands (if it is invertible).
the matrix
  a is generated row by row and stored, diagonal by di-
agonal, in the
  r o w s of the array q , with the main diagonal go-
ing into row
  k . see comments in the program below.
the banded system is then solved by a call to
  banfac (which con-
structs the triangular factorization for
  a and stores it again in
q ), followed by a call to
  banslv (which then obtains the solution
bcoef by substitution).
banfac does no pivoting, since the total positivity of the matrix
a makes this unnecessary.
     dimension q(2*k-1,n), t(n+k)
current fortran standard makes it impossible to specify precisely the
dimension of
  q and t without the introduction of otherwise super- fluous additional arguments.


Nemo Release 3.1 splint (3) June 29, 2025
Generated by manServer 1.08 from 7a126323-7adf-4a8f-af27-65fb43961429 using man macros.