diff options
author | 2008-01-06 16:35:21 +0000 | |
---|---|---|
committer | 2008-01-06 16:35:21 +0000 | |
commit | 84934ea217eb327ba0e3c357b3c68ab0e22d5160 (patch) | |
tree | 517efc9702ac2e448763e45f04e8906e86ebb1d1 /Eigen/src/Core/MathFunctions.h | |
parent | aaf889e72b005110530fb4252fb0858c2ec733de (diff) |
- move: DerivedTraits becomes MatrixBase::Traits
- the static constants are private again in the Derived classes
- more documentation and code snippets
- new isDiagonal() method
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 2cf28e8a7..c4b021baa 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -144,6 +144,10 @@ inline bool isMuchSmallerThan(const std::complex<float>& a, const std::complex<f { return abs2(a) <= abs2(b) * prec * prec; } +inline bool isMuchSmallerThan(const std::complex<float>& a, float b, float prec = precision<float>()) +{ + return abs2(a) <= abs2(b) * prec * prec; +} inline bool isApprox(const std::complex<float>& a, const std::complex<float>& b, float prec = precision<float>()) { return isApprox(std::real(a), std::real(b), prec) @@ -165,6 +169,10 @@ inline bool isMuchSmallerThan(const std::complex<double>& a, const std::complex< { return abs2(a) <= abs2(b) * prec * prec; } +inline bool isMuchSmallerThan(const std::complex<double>& a, double b, double prec = precision<double>()) +{ + return abs2(a) <= abs2(b) * prec * prec; +} inline bool isApprox(const std::complex<double>& a, const std::complex<double>& b, double prec = precision<double>()) { return isApprox(std::real(a), std::real(b), prec) |