Changeset 36065
- Timestamp:
- Aug 30, 2013, 4:37:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130711/Ohana/src/libohana/src/gaussj.c
r24080 r36065 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.
