aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseLU/SparseLU_Memory.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-07-10 23:48:26 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-07-10 23:48:26 +0200
commit6d1f5dbaaefcb9cc198aad362146131f8eec9cd7 (patch)
treebfc10b33b7d6efd0008a539fa3362616995fe518 /Eigen/src/SparseLU/SparseLU_Memory.h
parent71cccf0ed825022555b6da57ea64433622058601 (diff)
Add no_assignment_operator to a few classes that must not be assigned, and fix a couple of warnings.
Diffstat (limited to 'Eigen/src/SparseLU/SparseLU_Memory.h')
-rw-r--r--Eigen/src/SparseLU/SparseLU_Memory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/SparseLU/SparseLU_Memory.h b/Eigen/src/SparseLU/SparseLU_Memory.h
index 6d9570d19..a5158025c 100644
--- a/Eigen/src/SparseLU/SparseLU_Memory.h
+++ b/Eigen/src/SparseLU/SparseLU_Memory.h
@@ -70,7 +70,7 @@ Index SparseLUImpl<Scalar,Index>::expand(VectorType& vec, Index& length, Index
if(num_expansions == 0 || keep_prev)
new_len = length ; // First time allocate requested
else
- new_len = alpha * length ;
+ new_len = Index(alpha * length);
VectorType old_vec; // Temporary vector to hold the previous values
if (nbElts > 0 )
@@ -100,7 +100,7 @@ Index SparseLUImpl<Scalar,Index>::expand(VectorType& vec, Index& length, Index
do
{
alpha = (alpha + 1)/2;
- new_len = alpha * length ;
+ new_len = Index(alpha * length);
try
{
vec.resize(new_len);
@@ -141,7 +141,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.nzlmax = (std::max)(1., fillratio/4.) * annz; // estimated nnz in L factor
+ glu.nzlmax = (std::max)(Index(4), fillratio) * annz / 4; // estimated nnz in L factor
// Return the estimated size to the user if necessary
Index tempSpace;