Fix SPQR for rectangular matrices

This commit is contained in:
Gael Guennebaud
2016-10-12 22:39:33 +02:00
parent 091d373ee9
commit f939c351cb
2 changed files with 6 additions and 5 deletions

View File

@@ -20,8 +20,8 @@ int generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows
int cols = internal::random<int>(1,rows);
double density = (std::max)(8./(rows*cols), 0.01);
A.resize(rows,rows);
dA.resize(rows,rows);
A.resize(rows,cols);
dA.resize(rows,cols);
initSparse<Scalar>(density, dA, A,ForceNonZeroDiag);
A.makeCompressed();
return rows;