aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/adjoint.cpp
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 17:37:56 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-06-20 17:37:56 +0200
commitf1679c7185471289afaf702a45e336849d20a81a (patch)
tree2d6d649c8d0ae0985dfeaae2fdf2da47294264ae /test/adjoint.cpp
parente402d34407226d9c2c5dfc14ef5d6dbf53ee3c8e (diff)
Utilize Index in all unit tests.
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r--test/adjoint.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp
index fc6c8897b..2cf9ef380 100644
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -31,13 +31,14 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
/* this test covers the following files:
Transpose.h Conjugate.h Dot.h
*/
-
+ typedef typename MatrixType::Index Index;
typedef typename MatrixType::Scalar Scalar;
typedef typename NumTraits<Scalar>::Real RealScalar;
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;
- int rows = m.rows();
- int cols = m.cols();
+
+ Index rows = m.rows();
+ Index cols = m.cols();
RealScalar largerEps = test_precision<RealScalar>();
if (ei_is_same_type<RealScalar,float>::ret)
@@ -79,8 +80,8 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
VERIFY(ei_isApprox(v1.dot(square * v2), (square.adjoint() * v1).dot(v2), largerEps));
// like in testBasicStuff, test operator() to check const-qualification
- int r = ei_random<int>(0, rows-1),
- c = ei_random<int>(0, cols-1);
+ Index r = ei_random<Index>(0, rows-1),
+ c = ei_random<Index>(0, cols-1);
VERIFY_IS_APPROX(m1.conjugate()(r,c), ei_conj(m1(r,c)));
VERIFY_IS_APPROX(m1.adjoint()(c,r), ei_conj(m1(r,c)));