From dc6ad5e25b786ec6874158b33a77babf14d66941 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Mon, 21 Jun 2010 11:36:00 +0200 Subject: More Index related stuff. --- test/determinant.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/determinant.cpp') diff --git a/test/determinant.cpp b/test/determinant.cpp index 7aa9a870d..0e8f98988 100644 --- a/test/determinant.cpp +++ b/test/determinant.cpp @@ -31,7 +31,8 @@ template void determinant(const MatrixType& m) /* this test covers the following files: Determinant.h */ - int size = m.rows(); + typedef typename MatrixType::Index Index; + Index size = m.rows(); MatrixType m1(size, size), m2(size, size); m1.setRandom(); @@ -41,10 +42,10 @@ template void determinant(const MatrixType& m) VERIFY_IS_APPROX(MatrixType::Identity(size, size).determinant(), Scalar(1)); VERIFY_IS_APPROX((m1*m2).eval().determinant(), m1.determinant() * m2.determinant()); if(size==1) return; - int i = ei_random(0, size-1); - int j; + Index i = ei_random(0, size-1); + Index j; do { - j = ei_random(0, size-1); + j = ei_random(0, size-1); } while(j==i); m2 = m1; m2.row(i).swap(m2.row(j)); -- cgit v1.2.3