protect calls to min and max with parentheses to make Eigen compatible with default windows.h

(transplanted from 49b6e9143e
)
This commit is contained in:
Gael Guennebaud
2011-07-21 11:19:36 +02:00
parent d4bd8bddb5
commit 22bff949c8
67 changed files with 238 additions and 234 deletions

View File

@@ -127,10 +127,10 @@ bool MatrixFunctionAtomic<MatrixType>::taylorConverged(Index s, const MatrixType
for (Index r = 0; r < n; r++) {
RealScalar mx = 0;
for (Index i = 0; i < n; i++)
mx = std::max(mx, std::abs(m_f(m_Ashifted(i, i) + m_avgEival, static_cast<int>(s+r))));
mx = (std::max)(mx, std::abs(m_f(m_Ashifted(i, i) + m_avgEival, static_cast<int>(s+r))));
if (r != 0)
rfactorial *= RealScalar(r);
delta = std::max(delta, mx / rfactorial);
delta = (std::max)(delta, mx / rfactorial);
}
const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();
if (m_mu * delta * P_norm < NumTraits<Scalar>::epsilon() * F_norm)