aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-11-05 00:12:14 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-11-05 00:12:14 +0100
commit7c9cdd6030a95f0027d5723a758e2290d0b61deb (patch)
treea9d7ecc3e6d9b4ddf6f63994b7f38d8ab889b3e3
parenta236e15048014290b02472c18e8fb21d2a6ed99c (diff)
SparseLU: fix estimated non-zeros in U
-rw-r--r--Eigen/src/SparseLU/SparseLU_Memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_Memory.h b/Eigen/src/SparseLU/SparseLU_Memory.h
index 767519754..e1e7de043 100644
--- a/Eigen/src/SparseLU/SparseLU_Memory.h
+++ b/Eigen/src/SparseLU/SparseLU_Memory.h
@@ -153,7 +153,7 @@ Index SparseLUImpl<Scalar,Index>::memInit(Index m, Index n, Index annz, Index lw
{
Index& num_expansions = glu.num_expansions; //No memory expansions so far
num_expansions = 0;
- glu.nzumax = glu.nzlumax = (std::max)(fillratio * annz, m*n); // estimated number of nonzeros in U
+ glu.nzumax = glu.nzlumax = (std::min)(fillratio * annz, m*n); // estimated number of nonzeros in U
glu.nzlmax = (std::max)(Index(4), fillratio) * annz / 4; // estimated nnz in L factor
// Return the estimated size to the user if necessary