aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseQR
diff options
context:
space:
mode:
authorGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2013-01-14 14:20:42 +0100
committerGravatar Desire NUENTSA <desire.nuentsa_wakam@inria.fr>2013-01-14 14:20:42 +0100
commit904c2f137b42f8d6df6d2e309c6a57b5727a7ae7 (patch)
treecd28f71edf4633ae7dd4a6a65901805d3d1d093a /Eigen/src/SparseQR
parenta3b94d26c809a5cf9184e0642d90a5f47e2de595 (diff)
Fix the column permutation in SparseQR
Diffstat (limited to 'Eigen/src/SparseQR')
-rw-r--r--Eigen/src/SparseQR/SparseQR.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/SparseQR/SparseQR.h b/Eigen/src/SparseQR/SparseQR.h
index d78d5436d..c1348b320 100644
--- a/Eigen/src/SparseQR/SparseQR.h
+++ b/Eigen/src/SparseQR/SparseQR.h
@@ -235,12 +235,12 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
Index nzcolR, nzcolQ; // Number of nonzero for the current column of R and Q
Index pcol;
ScalarVector tval(m); tval.setZero(); // Temporary vector
- IndexVector iperm(m);
+ IndexVector iperm(n);
bool found_diag;
if (m_perm_c.size())
- for(int i = 0; i < m; i++) iperm(m_perm_c.indices()(i)) = i;
+ for(int i = 0; i < n; i++) iperm(m_perm_c.indices()(i)) = i;
else
- iperm.setLinSpaced(m, 0, m-1);
+ iperm.setLinSpaced(n, 0, n-1);
// Left looking QR factorization : Compute a column of R and Q at a time
for (Index col = 0; col < n; col++)