Index: mttroot/mtt/bin/trans/p/mtt_sparse.p ================================================================== --- mttroot/mtt/bin/trans/p/mtt_sparse.p +++ mttroot/mtt/bin/trans/p/mtt_sparse.p @@ -1,15 +1,18 @@ -PROCEDURE mtt_sparse( b : glnarray; - n : integer; - VAR x : glnarray; - VAR rsq : real); +PROCEDURE mtt_sparse( b : glnarray; + n,iters : INTEGER; + VAR x : glnarray); + {* ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.4 1998/08/15 09:33:25 peterg +## Deleted the commented out stuff +## ## Revision 1.3 1998/08/15 09:30:05 peterg ## Commented out the cariabel iteration stuff ## ## Revision 1.2 1998/08/15 08:26:30 peterg ## This is variable interations version - now going on to fixed @@ -30,20 +33,17 @@ in the main routine. They must also provide two routines, PROCEDURE asub(x: glnarray; VAR y: glnarray; n: integer); and PROCEDURE atsub(x: glnarray; VAR z: glnarray; n: integer); which calculate A*x and (A transpose)*x *) -LABEL 1,99; -CONST - iters = 500; VAR j,iter,irst: integer; rp,gg,gam,eps2,dgg,bsq,anum,aden: real; g,h,xi,xj: glnarray; -BEGIN +BEGIN {mtt_sparse} mtt_asub(x,xi,n); rp := 0.0; bsq := 0.0; FOR j := 1 TO n DO BEGIN xi[j] := xi[j]-b[j]; @@ -81,6 +81,6 @@ FOR j := 1 TO n DO BEGIN g[j] := -xi[j]; h[j] := g[j]+gam*h[j] END END; -END; +END {mtt_sparse};