gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
csaps.f
Go to the documentation of this file.
1  subroutine csaps ( x, y, dy, npoint, s, smY )
2 c chapter xiv, example 1. cubic smoothing spline
3 c from * a practical guide to splines * by c. de boor
4 calls bsplpp(bsplvb), ppvalu(interv), smooth(setupq,chol1d)
5 c values from a cubic b-spline are rounded to n d i g i t places
6 c after the decimal point, then smoothed via s m o o t h for
7 c various values of the control parameter s .
8  integer i,is,j,l,lsm,ndigit,npoint,ns
9  real a(npoint,4),coefsm(4,npoint-1),dy(npoint)
10  * ,s, scrtch(npoint,7),sfp,x(npoint),y(npoint), smy(npoint)
11 c equivalence (scrtch,coefsm)
12 
13  sfp = smooth( x, y, dy, npoint, s, scrtch, a )
14  do 10 i=1,npoint
15  smy(i)=a(i,1)
16  10 print *, smy(i)
17  return
18  lsm = npoint - 1
19  do 16 i=1,lsm
20  do 16 j=1,4
21  16 coefsm(j,i) = a(i,j)
22  do 20 i=1,npoint
23 c do 18 j=1,4
24 c 18 a(i,j) = ppvalu(x,coefsm,lsm,4,x(i),j-1)
25  20 smy(i)=ppvalu(x,coefsm,lsm,4,x(i),0)
26 c 20 print 620, s(is), sfp, (i,(a(i,j),j=1,4),i=1,npoint,5)
27 c 620 format(15h prescribed s =,e10.3,23h, s(smoothing spline) =,e10.3/
28 c * 54h value and derivatives of smoothing spline at corresp.
29 c * ,7h points/(i4,4e15.7))
30 c stop
31  end
float * x
double precision function smooth(x, y, dy, npoint, s, v, a)
Definition: smooth.f:2
void csaps()
double precision function ppvalu(break, coef, l, k, x, jderiv)
Definition: ppvalu.f:2
float * y
gtkIOStream: /tmp/gtkiostream/src/deBoor/csaps.f Source File
GTK+ IOStream  Beta