Overview
Comment:This is variable interations version - now going on to fixed
iterations
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 1d3d0b408f0cec92ea805b46282f8bab1554a5a3a299cc9251ac93af3c028c69
User & Date: gawthrop@users.sourceforge.net on 1998-08-15 08:26:30
Other Links: branch diff | manifest | tags
Context
1998-08-15
09:30:05
Commented out the cariabel iteration stuff check-in: f4415c4d81 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:26:30
This is variable interations version - now going on to fixed
iterations
check-in: 1d3d0b408f user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1998-08-14
15:37:38
rename now copies - no delete check-in: f36162a6f1 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/p/mtt_sparse.p from [5e780d3d5b] to [4258b05f2c].

1
2
3



4
5
6
7
8
9
10



11
12
13
14
15
16
17



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-
-
-
+
+
+







+
+
+







PROCEDURE mtt_sparse(	 b   : StateVector;
n			     : integer;
		     VAR x   : StateVector;
PROCEDURE mtt_sparse(	 b   : glnarray;
			 n   : integer;
		     VAR x   : glnarray;
		     VAR rsq : real);
{*
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1  1998/08/13 14:58:35  peterg
## Initial revision
##
## Revision 1.1  1998/08/13 08:40:40  peterg
## Initial revision
##
###############################################################
*}

(* Programs using routine SPARSE must define the type
53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70







-
+







      aden := 0.0;
      FOR j := 1 TO n DO BEGIN
         anum := anum+g[j]*h[j];
         aden := aden+sqr(xi[j])
      END;
      IF (aden = 0.0) THEN BEGIN
         writeln('pause in routine SPARSE');
         writeln('very singular matrix'); readln
         writeln('very singular matrix'); {***readln ***}
      END;
      anum := anum/aden;
      FOR j := 1 TO n DO BEGIN
         xi[j] := x[j];
         x[j] := x[j]+anum*h[j]
      END;
      mtt_asub(x,xj,n);
89
90
91
92
93
94
95
96
97
98





92
93
94
95
96
97
98



99
100
101
102
103







-
-
-
+
+
+
+
+
      IF (gg = 0.0) THEN GOTO 99;
      gam := dgg/gg;
      FOR j := 1 TO n DO BEGIN
         g[j] := -xi[j];
         h[j] := g[j]+gam*h[j]
      END
   END;
   writeln('pause in routine SPARSE');
   writeln('too many iterations'); readln;
99:   END;
   {***writeln('pause in routine SPARSE');
   writeln('too many iterations'); readln; **}

99:{**writeln("---",iter,rsq);**}
END;


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]