Mercurial > octave
diff liboctave/sparse-base-lu.cc @ 8954:97c84c4c2247
Make the column permutation vector in sparse LU cols()-long.
author | Jason Riedy <jason@acm.org> |
---|---|
date | Tue, 10 Mar 2009 21:54:34 -0400 |
parents | eb63fbe60fab |
children | 3ecbc236e2e0 |
line wrap: on
line diff
--- a/liboctave/sparse-base-lu.cc Wed Mar 11 00:39:02 2009 -0400 +++ b/liboctave/sparse-base-lu.cc Tue Mar 10 21:54:34 2009 -0400 @@ -121,11 +121,11 @@ sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pc_vec (void) const { - octave_idx_type nr = Lfact.rows (); + octave_idx_type nc = Ufact.cols (); - ColumnVector Pout (nr); + ColumnVector Pout (nc); - for (octave_idx_type i = 0; i < nr; i++) + for (octave_idx_type i = 0; i < nc; i++) Pout.xelem (i) = static_cast<double> (Q(i) + 1); return Pout;