1
subroutine fpbfou(t,n,par,ress,resc)
2
c subroutine fpbfou calculates the integrals
4
c ress(j) = ! nj,4(x)*sin(par*x) dx and
7
c resc(j) = ! nj,4(x)*cos(par*x) dx , j=1,2,...n-4
9
c where nj,4(x) denotes the cubic b-spline defined on the knots
10
c t(j),t(j+1),...,t(j+4).
13
c call fpbfou(t,n,par,ress,resc)
16
c t : real array,length n, containing the knots.
17
c n : integer, containing the number of knots.
18
c par : real, containing the value of the parameter par.
21
c ress : real array,length n, containing the integrals ress(j).
22
c resc : real array,length n, containing the integrals resc(j).
25
c n >= 10, t(4) < t(5) < ... < t(n-4) < t(n-3).
27
c ..scalar arguments..
31
real*8 t(n),ress(n),resc(n)
33
integer i,ic,ipj,is,j,jj,jp1,jp4,k,li,lj,ll,nmj,nm3,nm7
34
real*8 ak,beta,con1,con2,c1,c2,delta,eps,fac,f1,f2,f3,one,quart,
37
real*8 co(5),si(5),hs(5),hc(5),rs(3),rc(3)
38
c ..function references..
50
if(par.ne.0.) term = six/par
54
c calculate the integrals ress(j) and resc(j), j=1,2,3 by setting up
55
c a divided difference table.
62
call fpcsin(t(4),t(jp4),par,si(1),co(1),si(jp1),co(jp1),
79
hs(k) = (hs(k)-hs(k-1))/fac
80
hc(k) = (hc(k)-hc(k-1))/fac
87
if(nm7.lt.4) go to 160
88
c calculate the integrals ress(j) and resc(j),j=4,5,...,n-7.
95
c the way of computing ress(j) and resc(j) depends on the value of
96
c beta = par*(t(j+4)-t(j)).
98
if(abs(beta).le.one) go to 60
99
c if !beta! > 1 the integrals are calculated by setting up a divided
110
fac = par*(t(li)-t(lj))
111
hs(k) = (hs(k)-hs(k-1))/fac
112
hc(k) = (hc(k)-hc(k-1))/fac
116
s2 = (hs(5)-hs(4))*term
117
c2 = (hc(5)-hc(4))*term
119
c if !beta! <= 1 the integrals are calculated by evaluating a series
124
hs(i) = par*(t(ipj)-t(j))
131
if(abs(f3).le.eps) go to 120
156
100 if(abs(f3).le.eps) go to 120
158
120 s2 = delta*(co(1)*s1+si(1)*c1)
159
c2 = delta*(co(1)*c1-si(1)*s1)
167
c calculate the integrals ress(j) and resc(j),j=n-6,n-5,n-4 by setting
168
c up a divided difference table.
172
call fpcsin(t(nm3),t(nmj),par,si(4),co(4),si(i-1),co(i-1),
188
hs(k) = (hs(k-1)-hs(k))/fac
189
hc(k) = (hc(k-1)-hc(k))/fac
193
ress(nmj) = hs(4)-hs(5)
194
resc(nmj) = hc(4)-hc(5)