1
subroutine spalde(t,n,c,k1,x,d,ier)
2
c subroutine spalde evaluates at a point x all the derivatives
4
c d(j) = s (x) , j=1,2,...,k1
5
c of a spline s(x) of order k1 (degree k=k1-1), given in its b-spline
9
c call spalde(t,n,c,k1,x,d,ier)
12
c t : array,length n, which contains the position of the knots.
13
c n : integer, giving the total number of knots of s(x).
14
c c : array,length n, which contains the b-spline coefficients.
15
c k1 : integer, giving the order of s(x) (order=degree+1)
16
c x : real, which contains the point where the derivatives must
20
c d : array,length k1, containing the derivative values of s(x).
22
c ier = 0 : normal return
23
c ier =10 : invalid input data (see restrictions)
26
c t(k1) <= x <= t(n-k1+1)
29
c if x coincides with a knot, right derivatives are computed
30
c ( left derivatives if x = t(n-k1+1) ).
32
c other subroutines required: fpader.
35
c de boor c : on calculating with b-splines, j. approximation theory
37
c cox m.g. : the numerical evaluation of b-splines, j. inst. maths
38
c applics 10 (1972) 134-149.
39
c dierckx p. : curve and surface fitting with splines, monographs on
40
c numerical analysis, oxford university press, 1993.
44
c dept. computer science, k.u.leuven
45
c celestijnenlaan 200a, b-3001 heverlee, belgium.
46
c e-mail : Paul.Dierckx@cs.kuleuven.ac.be
48
c latest update : march 1987
50
c ..scalar arguments..
54
real*8 t(n),c(n),d(k1)
58
c before starting computations a data check is made. if the input data
59
c are invalid control is immediately repassed to the calling program.
62
if(x.lt.t(k1) .or. x.gt.t(nk1+1)) go to 300
63
c search for knot interval t(l) <= x < t(l+1)
65
100 if(x.lt.t(l+1) .or. l.eq.nk1) go to 200
68
200 if(t(l).ge.t(l+1)) go to 300
70
c calculate the derivatives.
71
call fpader(t,n,c,k1,x,l,d)