aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/OrderingMethods
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-06-15 09:06:32 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-06-15 09:06:32 +0200
commitc858fb353f90673614da5acc3adac5dd18fdf9fc (patch)
treec805632da2dda94ed20c9eee1180d21a152750bf /Eigen/src/OrderingMethods
parent37d367a231382c67db43f897880e0261c0cc2db5 (diff)
fix a few warnings
Diffstat (limited to 'Eigen/src/OrderingMethods')
-rw-r--r--Eigen/src/OrderingMethods/Amd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Eigen/src/OrderingMethods/Amd.h b/Eigen/src/OrderingMethods/Amd.h
index df4e01d6c..ec13077fe 100644
--- a/Eigen/src/OrderingMethods/Amd.h
+++ b/Eigen/src/OrderingMethods/Amd.h
@@ -106,6 +106,7 @@ Index cs_tdfs(Index j, Index k, Index *head, const Index *next, Index *post, Ind
template<typename Scalar, typename Index>
void minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,Index>& C, PermutationMatrix<Dynamic,Dynamic,Index>& perm)
{
+ using std::sqrt;
typedef SparseMatrix<Scalar,ColMajor,Index> CCS;
int d, dk, dext, lemax = 0, e, elenk, eln, i, j, k, k1,
@@ -114,7 +115,7 @@ void minimum_degree_ordering(SparseMatrix<Scalar,ColMajor,Index>& C, Permutation
unsigned int h;
Index n = C.cols();
- dense = std::max<Index> (16, 10 * sqrt ((double) n)); /* find dense threshold */
+ dense = std::max<Index> (16, Index(10 * sqrt(double(n)))); /* find dense threshold */
dense = std::min<Index> (n-2, dense);
Index cnz = C.nonZeros();