comparison liboctave/base-lu.cc @ 4811:198f3712c692

[project @ 2004-03-03 19:24:33 by jwe]
author jwe
date Wed, 03 Mar 2004 19:24:33 +0000
parents d53c33d93440
children e35b034d3523
comparison
equal deleted inserted replaced
4810:72a6d410a14a 4811:198f3712c692
40 40
41 lu_type l (a_nr, mn, lu_elt_type (0.0)); 41 lu_type l (a_nr, mn, lu_elt_type (0.0));
42 42
43 for (int i = 0; i < a_nr; i++) 43 for (int i = 0; i < a_nr; i++)
44 { 44 {
45 l.xelem (i, i) = 1.0; 45 if (i < a_nc)
46 l.xelem (i, i) = 1.0;
47
46 for (int j = 0; j < (i < a_nc ? i : a_nc); j++) 48 for (int j = 0; j < (i < a_nc ? i : a_nc); j++)
47 l.xelem (i, j) = a_fact.xelem (i, j); 49 l.xelem (i, j) = a_fact.xelem (i, j);
48 } 50 }
49 51
50 return l; 52 return l;