From f5328be65a028d34bce6f0e89fc1a613b978c701 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 16 Dec 2014 18:23:13 +0100 Subject: [PATCH] SparseQR is really for rows>=columns, so let's only check such cases --- test/sparseqr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/sparseqr.cpp b/test/sparseqr.cpp index 8e6887dd3..451c0e7f8 100644 --- a/test/sparseqr.cpp +++ b/test/sparseqr.cpp @@ -10,12 +10,11 @@ #include template -int generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows = 300, int maxCols = 150) +int generate_sparse_rectangular_problem(MatrixType& A, DenseMat& dA, int maxRows = 300) { - eigen_assert(maxRows >= maxCols); typedef typename MatrixType::Scalar Scalar; int rows = internal::random(1,maxRows); - int cols = internal::random(1,maxCols); + int cols = internal::random(1,rows); double density = (std::max)(8./(rows*cols), 0.01); A.resize(rows,cols);