diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-10-20 15:55:32 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-10-20 15:55:32 +0200 |
commit | fe57b2f963da832d14f4d7b6d4a9554ceef26e36 (patch) | |
tree | ed0e5d13ae6dde3f98d012ad3f87570b77e8230d /Eigen/src/SVD/JacobiSVD.h | |
parent | c12b7896d0ddf95e8f060c93a5cf2fcfa1e6865c (diff) |
bug #701: workaround (min) and (max) blocking ADL by introducing numext::mini and numext::maxi internal functions and a EIGEN_NOT_A_MACRO macro.
Diffstat (limited to 'Eigen/src/SVD/JacobiSVD.h')
-rw-r--r-- | Eigen/src/SVD/JacobiSVD.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 7a8aa8d3f..0f7e5b8fe 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -723,8 +723,7 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig // if this 2x2 sub-matrix is not diagonal already... // notice that this comparison will evaluate to false if any NaN is involved, ensuring that NaN's don't // keep us iterating forever. Similarly, small denormal numbers are considered zero. - EIGEN_USING_STD_MATH(max); - RealScalar threshold = (max)(considerAsZero, precision * (max)(abs(m_workMatrix.coeff(p,p)), + RealScalar threshold = numext::maxi(considerAsZero, precision * numext::maxi(abs(m_workMatrix.coeff(p,p)), abs(m_workMatrix.coeff(q,q)))); // We compare both values to threshold instead of calling max to be robust to NaN (See bug 791) if(abs(m_workMatrix.coeff(p,q))>threshold || abs(m_workMatrix.coeff(q,p)) > threshold) |