Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a3b995ab447ea590e12d22acec82b97f |
User & Date: | gawthrop@users.sourceforge.net on 1998-08-17 12:58:16 |
Other Links: | branch diff | manifest | tags |
Context
1998-08-17
| ||
15:48:39 | Replaced SVD solver with LUD solver check-in: 3f75d5cb10 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
12:58:16 | Initial revision check-in: a3b995ab44 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
12:52:16 | Initial revision check-in: 2a3fa5bb42 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/p/mtt_lubksb.p version [29347bf816].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | PROCEDURE lubksb(a: StateMatrix; n: INTEGER; indx: StateVector; VAR b: StateVector); { ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### } (* Programs using LUBKSB must define the types TYPE glnarray = ARRAY [1..n] OF real; glindx = ARRAY [1..n] OF integer; glnpbynp = ARRAY [1..np,1..np] OF real; in the main routine *) VAR j,ip,ii,i: integer; sum: real; BEGIN ii := 0; FOR i := 1 TO n DO BEGIN ip := indx[i]; sum := b[ip]; b[ip] := b[i]; IF (ii <> 0) THEN BEGIN FOR j := ii TO i-1 DO BEGIN sum := sum-a[i,j]*b[j] END END ELSE IF (sum <> 0.0) THEN BEGIN ii := i END; b[i] := sum END; FOR i := n DOWNTO 1 DO BEGIN sum := b[i]; IF (i < n) THEN BEGIN FOR j := i+1 TO n DO BEGIN sum := sum-a[i,j]*b[j] END END; b[i] := sum/a[i,i] END END; |