From 4716040703be1ee906439385d20475dcddad5ce3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 25 Oct 2010 10:15:22 -0400 Subject: bug #86 : use internal:: namespace instead of ei_ prefix --- test/block.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'test/block.cpp') diff --git a/test/block.cpp b/test/block.cpp index 1c2e080ad..6c5681683 100644 --- a/test/block.cpp +++ b/test/block.cpp @@ -48,12 +48,12 @@ template void block(const MatrixType& m) v3 = VectorType::Random(rows), vzero = VectorType::Zero(rows); - Scalar s1 = ei_random(); + Scalar s1 = internal::random(); - Index r1 = ei_random(0,rows-1); - Index r2 = ei_random(r1,rows-1); - Index c1 = ei_random(0,cols-1); - Index c2 = ei_random(c1,cols-1); + Index r1 = internal::random(0,rows-1); + Index r2 = internal::random(r1,rows-1); + Index c1 = internal::random(0,cols-1); + Index c2 = internal::random(c1,cols-1); //check row() and col() VERIFY_IS_EQUAL(m1.col(c1).transpose(), m1.transpose().row(c1)); @@ -100,16 +100,16 @@ template void block(const MatrixType& m) VERIFY_IS_EQUAL(v1.template tail<2>(), v1.tail(2)); VERIFY_IS_EQUAL(v1.template tail<2>(), v1.segment(i,2)); VERIFY_IS_EQUAL(v1.template tail<2>(), v1.template segment<2>(i)); - i = ei_random(0,rows-2); + i = internal::random(0,rows-2); VERIFY_IS_EQUAL(v1.segment(i,2), v1.template segment<2>(i)); } // stress some basic stuffs with block matrices - VERIFY(ei_real(ones.col(c1).sum()) == RealScalar(rows)); - VERIFY(ei_real(ones.row(r1).sum()) == RealScalar(cols)); + VERIFY(internal::real(ones.col(c1).sum()) == RealScalar(rows)); + VERIFY(internal::real(ones.row(r1).sum()) == RealScalar(cols)); - VERIFY(ei_real(ones.col(c1).dot(ones.col(c2))) == RealScalar(rows)); - VERIFY(ei_real(ones.row(r1).dot(ones.row(r2))) == RealScalar(cols)); + VERIFY(internal::real(ones.col(c1).dot(ones.col(c2))) == RealScalar(rows)); + VERIFY(internal::real(ones.row(r1).dot(ones.row(r2))) == RealScalar(cols)); // now test some block-inside-of-block. @@ -197,10 +197,10 @@ void data_and_stride(const MatrixType& m) Index rows = m.rows(); Index cols = m.cols(); - Index r1 = ei_random(0,rows-1); - Index r2 = ei_random(r1,rows-1); - Index c1 = ei_random(0,cols-1); - Index c2 = ei_random(c1,cols-1); + Index r1 = internal::random(0,rows-1); + Index r2 = internal::random(r1,rows-1); + Index c1 = internal::random(0,cols-1); + Index c2 = internal::random(c1,cols-1); MatrixType m1 = MatrixType::Random(rows, cols); compare_using_data_and_stride(m1.block(r1, c1, r2-r1+1, c2-c1+1)); @@ -224,8 +224,8 @@ void test_block() CALL_SUBTEST_8( block(Matrix(3, 4)) ); #ifndef EIGEN_DEFAULT_TO_ROW_MAJOR - CALL_SUBTEST_6( data_and_stride(MatrixXf(ei_random(5,50), ei_random(5,50))) ); - CALL_SUBTEST_7( data_and_stride(Matrix(ei_random(5,50), ei_random(5,50))) ); + CALL_SUBTEST_6( data_and_stride(MatrixXf(internal::random(5,50), internal::random(5,50))) ); + CALL_SUBTEST_7( data_and_stride(Matrix(internal::random(5,50), internal::random(5,50))) ); #endif } } -- cgit v1.2.3