diff options
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 990509d48..6651b6535 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -862,10 +862,24 @@ template<> struct random_impl<bool> template<> struct scalar_fuzzy_impl<bool> { + typedef bool RealScalar; + + template<typename OtherScalar> + static inline bool isMuchSmallerThan(const bool& x, const bool&, const bool&) + { + return !x; + } + static inline bool isApprox(bool x, bool y, bool) { return x == y; } + + static inline bool isApproxOrLessThan(const bool& x, const bool& y, const bool&) + { + return (!x) || y; + } + }; } // end namespace internal |