Changeset 25027 for branches/pap/Ohana/src/opihi/cmd.data/gaussj.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/Ohana
- Property svn:mergeinfo deleted
-
branches/pap/Ohana/src/opihi/cmd.data/gaussj.c
r20936 r25027 47 47 status = dgaussjordan (a, b, N, 1); 48 48 49 // output vector needs to be float, so re-cast it 50 ResetVector (B, OPIHI_FLT, N); 51 vf = B[0].elements.Flt; 49 // if dgaussjordan succeeds, replace the input values with the results 50 if (status) { 51 // output vector needs to be float, so re-cast it 52 ResetVector (B, OPIHI_FLT, N); 53 vf = B[0].elements.Flt; 52 54 53 for (i = 0; i < N; i++) { 54 for (j = 0; j < N; j++) { 55 m[i+j*N] = a[i][j]; 55 for (i = 0; i < N; i++) { 56 for (j = 0; j < N; j++) { 57 m[i+j*N] = a[i][j]; 58 } 59 vf[i] = b[i][0]; 56 60 } 57 vf[i] = b[i][0];58 61 } 59 62 … … 66 69 67 70 if (!status && !QUIET) { 68 gprint (GP_ERR, " failure in matrix solution\n");71 gprint (GP_ERR, "gaussjordan: ill-conditioned matrix; input values are retained\n"); 69 72 } 70 73 return (status);
Note:
See TracChangeset
for help on using the changeset viewer.
