diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-07-21 11:19:36 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-07-21 11:19:36 +0200 |
commit | 22bff949c898e7c340a415d771145c0bd22317d6 (patch) | |
tree | be0fc956a220db15d4d7622fc580777f563ea643 /Eigen/src/Eigenvalues/RealSchur.h | |
parent | d4bd8bddb5e9f968ffcbdfff5936934e3d706684 (diff) |
protect calls to min and max with parentheses to make Eigen compatible with default windows.h
(transplanted from 49b6e9143e1d74441924c0c313536e263e12a55c
)
Diffstat (limited to 'Eigen/src/Eigenvalues/RealSchur.h')
-rw-r--r-- | Eigen/src/Eigenvalues/RealSchur.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Eigenvalues/RealSchur.h b/Eigen/src/Eigenvalues/RealSchur.h index c61ae444c..cc9af11c1 100644 --- a/Eigen/src/Eigenvalues/RealSchur.h +++ b/Eigen/src/Eigenvalues/RealSchur.h @@ -290,7 +290,7 @@ inline typename MatrixType::Scalar RealSchur<MatrixType>::computeNormOfT() // + m_matT.bottomLeftCorner(size-1,size-1).diagonal().cwiseAbs().sum(); Scalar norm = 0.0; for (Index j = 0; j < size; ++j) - norm += m_matT.row(j).segment(std::max(j-1,Index(0)), size-std::max(j-1,Index(0))).cwiseAbs().sum(); + norm += m_matT.row(j).segment((std::max)(j-1,Index(0)), size-(std::max)(j-1,Index(0))).cwiseAbs().sum(); return norm; } @@ -442,7 +442,7 @@ inline void RealSchur<MatrixType>::performFrancisQRStep(Index il, Index im, Inde // These Householder transformations form the O(n^3) part of the algorithm m_matT.block(k, k, 3, size-k).applyHouseholderOnTheLeft(ess, tau, workspace); - m_matT.block(0, k, std::min(iu,k+3) + 1, 3).applyHouseholderOnTheRight(ess, tau, workspace); + m_matT.block(0, k, (std::min)(iu,k+3) + 1, 3).applyHouseholderOnTheRight(ess, tau, workspace); if (computeU) m_matU.block(0, k, size, 3).applyHouseholderOnTheRight(ess, tau, workspace); } |