mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
SparseLU: fix estimated non-zeros in U
(transplanted from 7c9cdd6030a95f0027d5723a758e2290d0b61deb )
This commit is contained in:
parent
8946e0cb80
commit
d21708172a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user