From a76fbbf39777827200455477a9e3557b6063913f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 6 Nov 2012 15:25:50 +0100 Subject: Fix bug #314: - remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std) - remove the overloads for array expression that were in the std namespace --- test/redux.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/redux.cpp') diff --git a/test/redux.cpp b/test/redux.cpp index e07d4b1e4..dd6edd1bd 100644 --- a/test/redux.cpp +++ b/test/redux.cpp @@ -61,6 +61,7 @@ template void matrixRedux(const MatrixType& m) template void vectorRedux(const VectorType& w) { + using std::abs; typedef typename VectorType::Index Index; typedef typename VectorType::Scalar Scalar; typedef typename NumTraits::Real RealScalar; @@ -80,7 +81,7 @@ template void vectorRedux(const VectorType& w) minc = (std::min)(minc, internal::real(v[j])); maxc = (std::max)(maxc, internal::real(v[j])); } - VERIFY_IS_MUCH_SMALLER_THAN(internal::abs(s - v.head(i).sum()), Scalar(1)); + VERIFY_IS_MUCH_SMALLER_THAN(abs(s - v.head(i).sum()), Scalar(1)); VERIFY_IS_APPROX(p, v_for_prod.head(i).prod()); VERIFY_IS_APPROX(minc, v.real().head(i).minCoeff()); VERIFY_IS_APPROX(maxc, v.real().head(i).maxCoeff()); @@ -97,7 +98,7 @@ template void vectorRedux(const VectorType& w) minc = (std::min)(minc, internal::real(v[j])); maxc = (std::max)(maxc, internal::real(v[j])); } - VERIFY_IS_MUCH_SMALLER_THAN(internal::abs(s - v.tail(size-i).sum()), Scalar(1)); + VERIFY_IS_MUCH_SMALLER_THAN(abs(s - v.tail(size-i).sum()), Scalar(1)); VERIFY_IS_APPROX(p, v_for_prod.tail(size-i).prod()); VERIFY_IS_APPROX(minc, v.real().tail(size-i).minCoeff()); VERIFY_IS_APPROX(maxc, v.real().tail(size-i).maxCoeff()); @@ -114,7 +115,7 @@ template void vectorRedux(const VectorType& w) minc = (std::min)(minc, internal::real(v[j])); maxc = (std::max)(maxc, internal::real(v[j])); } - VERIFY_IS_MUCH_SMALLER_THAN(internal::abs(s - v.segment(i, size-2*i).sum()), Scalar(1)); + VERIFY_IS_MUCH_SMALLER_THAN(abs(s - v.segment(i, size-2*i).sum()), Scalar(1)); VERIFY_IS_APPROX(p, v_for_prod.segment(i, size-2*i).prod()); VERIFY_IS_APPROX(minc, v.real().segment(i, size-2*i).minCoeff()); VERIFY_IS_APPROX(maxc, v.real().segment(i, size-2*i).maxCoeff()); -- cgit v1.2.3