diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-11-06 15:25:50 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-11-06 15:25:50 +0100 |
commit | a76fbbf39777827200455477a9e3557b6063913f (patch) | |
tree | 6a03f8fcb163fa2c3dc2267c52fd1204f5490309 /test/redux.cpp | |
parent | 959ef37006e60f68b9a9e667bf9da2e14eb0e8af (diff) |
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
Diffstat (limited to 'test/redux.cpp')
-rw-r--r-- | test/redux.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<typename MatrixType> void matrixRedux(const MatrixType& m) template<typename VectorType> void vectorRedux(const VectorType& w) { + using std::abs; typedef typename VectorType::Index Index; typedef typename VectorType::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; @@ -80,7 +81,7 @@ template<typename VectorType> 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<typename VectorType> 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<typename VectorType> 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()); |