## Revision 303

trunk/src/df1b2-separable/df1b2ludcmp.cpp (revision 303)
154 154
```   df1b2matrix & alpha = dcmp.get_L();
```
155 155

156 156
```   //check if invertable
```
157
```   df1b2variable det = 1.0;
```
157
```	df1b2variable ln_det = 0.0;
```
158 158
```   for (int i = lb; i <= ub; i++)
```
159 159
```   {
```
160
```      det *= dcmp(i, i);
```
160
```		 ln_det += log(dcmp(i, i));
```
161 161
```   }
```
162
```   if (value(det) == 0.0)
```
162
```   if (exp(value(ln_det)) == 0.0)
```
163 163
```   {
```
164 164
```      cerr <<
```
165 165
```	 "Error in matrix inverse -- matrix singular in solve(df1b2matrix)\n";
```
54 54

55 55
```   //check if invertable
```
56 56
```   int i;
```
57
```   double det = 1.0;
```
57
```   double ln_det = 0.0;
```
58 58
```   for (i = lb; i <= ub; i++)
```
59 59
```   {
```
60
```      det *= dcmp(i, i);
```
60
```      ln_det += log(dcmp(i, i));
```
61 61
```   }
```
62
```   if (det == 0.0)
```
62
```   if (exp(ln_det) == 0.0)
```
63 63
```   {
```
64 64
```      cerr <<
```
65 65
```	 "Error in matrix inverse -- matrix singular in solve(dmatrix)\n";
```
218 218
```   cltudecomp clu = xludecomp_pivot_for_expm_solve(aa,index2);
```
219 219

220 220
```   //check if invertable
```
221
```   double det = 1.0;
```
221
```	double ln_det = 0.0;
```
222

222 223
```   for (int i = lb; i <= ub; i++)
```
223 224
```   {
```
224
```      det *= clu(i, i);
```
225
```	ln_det += log(clu(i, i));
```
225 226
```   }
```
226
```   if (det == 0.0)
```
227
```	if(exp(ln_det)==0.0)
```
227 228
```   {
```
228 229
```      cerr <<
```
229 230
```	 "Error in matrix inverse -- matrix singular in solve(dvar_matrix)\n";
```
......
283 284
```   dmatrix & alpha = clu1.get_L();
```
284 285

285 286
```   //check if invertable --- may be able to get rid of this check
```
286
```   double det = 1.0;
```
287
```	double ln_det = 0.0;
```
287 288
```   for (int i = lb; i <= ub; i++)
```
288 289
```   {
```
289
```      det *= clu1(i, i);
```
290
```		ln_det += log(clu1(i, i));
```
290 291
```   }
```
291
```   if (det == 0.0)
```
292
```	if(exp(ln_det)==0.0)
```
292 293
```   {
```
293 294
```      cerr <<
```
294 295
```	 "Error in matrix inverse -- matrix singular in solve(dvar_matrix)\n";
```
69 69
```   ivector index2 = dcmp.get_index2();
```
70 70

71 71
```   //check if invertable
```
72
```   double det = 1.0;
```
72
```   double ln_det = 0.0;
```
73 73
```   for (int i = lb; i <= ub; i++)
```
74 74
```   {
```
75
```      det *= dcmp(i, i);
```
75
```      ln_det += log(dcmp(i, i));
```
76 76
```   }
```
77
```   if (det == 0.0)
```
77
```   if (exp(ln_det) == 0.0)
```
78 78
```   {
```
79 79
```      cerr <<
```
80 80
```	 "Error in matrix inverse -- matrix singular in solve(dmatrix)\n";
```
......
148 148
```   dmatrix & alpha = clu1.get_L();
```
149 149

150 150
```   //check if invertable
```
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff