diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-02-10 10:52:28 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-02-10 10:52:28 +0100 |
commit | fe0827495ab34749b8896bbebc0ff9fcc661c13b (patch) | |
tree | 93f7fc6799ef83c77188f64ed9176b61e3a04b33 /test/product.h | |
parent | c11df02f0d8fdc546a9de27038d8a9d175936a54 (diff) |
* move dummy_precision and epsilon to NumTraits
* make NumTraits inherits std::numeric_limits
Diffstat (limited to 'test/product.h')
-rw-r--r-- | test/product.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/product.h b/test/product.h index 85afbe1e4..f6109fae4 100644 --- a/test/product.h +++ b/test/product.h @@ -26,7 +26,7 @@ #include <Eigen/QR> template<typename Derived1, typename Derived2> -bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = dummy_precision<typename Derived1::RealScalar>()) +bool areNotApprox(const MatrixBase<Derived1>& m1, const MatrixBase<Derived2>& m2, typename Derived1::RealScalar epsilon = NumTraits<typename Derived1::RealScalar>::dummy_precision()) { return !((m1-m2).cwiseAbs2().maxCoeff() < epsilon * epsilon * std::max(m1.cwiseAbs2().maxCoeff(), m2.cwiseAbs2().maxCoeff())); |