diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-03-11 11:06:13 +0000 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-03-11 11:06:13 +0000 |
commit | e7d237668812c265671ee11a8ea5c5f9934eac80 (patch) | |
tree | 68856ccf74be1fda297f6bdebffb2178e7f9fb1e /test | |
parent | dc36efbb8fca6f5cfce5fcd26402544f41402808 (diff) |
Change int to Index in equalsIdentity().
This fixes compilation errors in nullary test on 64-bits machines.
Diffstat (limited to 'test')
-rw-r--r-- | test/nullary.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/nullary.cpp b/test/nullary.cpp index 3a46e10c7..70cd30df2 100644 --- a/test/nullary.cpp +++ b/test/nullary.cpp @@ -27,17 +27,18 @@ template<typename MatrixType> bool equalsIdentity(const MatrixType& A) { + typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; Scalar zero = static_cast<Scalar>(0); bool offDiagOK = true; - for (int i = 0; i < A.rows(); ++i) { - for (int j = i+1; j < A.cols(); ++j) { + for (Index i = 0; i < A.rows(); ++i) { + for (Index j = i+1; j < A.cols(); ++j) { offDiagOK = offDiagOK && (A(i,j) == zero); } } - for (int i = 0; i < A.rows(); ++i) { - for (int j = 0; j < std::min(i, A.cols()); ++j) { + for (Index i = 0; i < A.rows(); ++i) { + for (Index j = 0; j < std::min(i, A.cols()); ++j) { offDiagOK = offDiagOK && (A(i,j) == zero); } } |