comparison 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
comparison
equal deleted inserted replaced
8953:a6945f92b868 8954:97c84c4c2247
119 template <class lu_type, class lu_elt_type, class p_type, class p_elt_type> 119 template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
120 ColumnVector 120 ColumnVector
121 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pc_vec (void) const 121 sparse_base_lu <lu_type, lu_elt_type, p_type, p_elt_type> :: Pc_vec (void) const
122 { 122 {
123 123
124 octave_idx_type nr = Lfact.rows (); 124 octave_idx_type nc = Ufact.cols ();
125 125
126 ColumnVector Pout (nr); 126 ColumnVector Pout (nc);
127 127
128 for (octave_idx_type i = 0; i < nr; i++) 128 for (octave_idx_type i = 0; i < nc; i++)
129 Pout.xelem (i) = static_cast<double> (Q(i) + 1); 129 Pout.xelem (i) = static_cast<double> (Q(i) + 1);
130 130
131 return Pout; 131 return Pout;
132 } 132 }
133 133