- Timestamp:
- Apr 21, 2014, 5:42:34 AM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/libohana/src (modified) (1 prop)
-
Ohana/src/libohana/src/gaussj.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/Ohana
- Property svn:mergeinfo deleted
-
branches/eam_branches/ps2-tc3-20130727/Ohana/src/libohana/src
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/Ohana/src/libohana/src/gaussj.c
r24080 r36680 1 1 # include <ohana.h> 2 2 # define GROWTHTEST 0 3 # define MAX_RANGE 1.0e 73 # define MAX_RANGE 1.0e9 4 4 5 5 // Gauss-Jordan elimination using full pivots based on Press et al's description. Substantially … … 91 91 /* rescale by pivot reciprocal */ 92 92 double tmpval = 1.0 / A[maxcol][maxcol]; 93 // XXX why is this here (don't I double count this element?) A[maxcol][maxcol] = 1.0; 93 94 A[maxcol][maxcol] = 1.0; 94 95 for (col = 0; col < N; col++) A[maxcol][col] *= tmpval; … … 117 118 } 118 119 } 120 121 # if (GROWTHTEST) 122 fprintf (stderr, "final A matrix:\n"); 123 for (row = 0; row < N; row++) { 124 for (col = 0; col < N; col++) { 125 fprintf (stderr, "%10.3e ", A[row][col]); 126 } 127 fprintf (stderr, "\n"); 128 } 129 fprintf (stderr, "\n"); 130 # endif 119 131 120 132 // swap back the inverse matrix based on the row swaps above
Note:
See TracChangeset
for help on using the changeset viewer.
