aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cholesky.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2014-07-08 16:47:11 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2014-07-08 16:47:11 +0200
commitb47ef1431f2e4d1218253df179b593cc5c269aa7 (patch)
tree37f8ebcfa5fc49a376f2eb3a13e19805274797e3 /test/cholesky.cpp
parente25e6748521818fb13270f7351df8538eb54a056 (diff)
Fix many long to int implicit conversions
Diffstat (limited to 'test/cholesky.cpp')
-rw-r--r--test/cholesky.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cholesky.cpp b/test/cholesky.cpp
index 1d147bd7a..a883192ab 100644
--- a/test/cholesky.cpp
+++ b/test/cholesky.cpp
@@ -181,7 +181,7 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
if(rows>=3)
{
SquareMatrixType A = symm;
- int c = internal::random<int>(0,rows-2);
+ Index c = internal::random<Index>(0,rows-2);
A.bottomRightCorner(c,c).setZero();
// Make sure a solution exists:
vecX.setRandom();
@@ -196,7 +196,7 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
// check non-full rank matrices
if(rows>=3)
{
- int r = internal::random<int>(1,rows-1);
+ Index r = internal::random<Index>(1,rows-1);
Matrix<Scalar,Dynamic,Dynamic> a = Matrix<Scalar,Dynamic,Dynamic>::Random(rows,r);
SquareMatrixType A = a * a.adjoint();
// Make sure a solution exists:
@@ -215,7 +215,7 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
RealScalar s = (std::min)(16,std::numeric_limits<RealScalar>::max_exponent10/8);
Matrix<Scalar,Dynamic,Dynamic> a = Matrix<Scalar,Dynamic,Dynamic>::Random(rows,rows);
Matrix<RealScalar,Dynamic,1> d = Matrix<RealScalar,Dynamic,1>::Random(rows);
- for(int k=0; k<rows; ++k)
+ for(Index k=0; k<rows; ++k)
d(k) = d(k)*std::pow(RealScalar(10),internal::random<RealScalar>(-s,s));
SquareMatrixType A = a * d.asDiagonal() * a.adjoint();
// Make sure a solution exists: