aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/QR/HouseholderQR.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-07-21 11:19:36 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-07-21 11:19:36 +0200
commit22bff949c898e7c340a415d771145c0bd22317d6 (patch)
treebe0fc956a220db15d4d7622fc580777f563ea643 /Eigen/src/QR/HouseholderQR.h
parentd4bd8bddb5e9f968ffcbdfff5936934e3d706684 (diff)
protect calls to min and max with parentheses to make Eigen compatible with default windows.h
Diffstat (limited to 'Eigen/src/QR/HouseholderQR.h')
-rw-r--r--Eigen/src/QR/HouseholderQR.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h
index 0d2b74893..c8a4b17e7 100644
--- a/Eigen/src/QR/HouseholderQR.h
+++ b/Eigen/src/QR/HouseholderQR.h
@@ -88,13 +88,13 @@ template<typename _MatrixType> class HouseholderQR
*/
HouseholderQR(Index rows, Index cols)
: m_qr(rows, cols),
- m_hCoeffs(std::min(rows,cols)),
+ m_hCoeffs((std::min)(rows,cols)),
m_temp(cols),
m_isInitialized(false) {}
HouseholderQR(const MatrixType& matrix)
: m_qr(matrix.rows(), matrix.cols()),
- m_hCoeffs(std::min(matrix.rows(),matrix.cols())),
+ m_hCoeffs((std::min)(matrix.rows(),matrix.cols())),
m_temp(matrix.cols()),
m_isInitialized(false)
{
@@ -210,7 +210,7 @@ void householder_qr_inplace_unblocked(MatrixQR& mat, HCoeffs& hCoeffs, typename
typedef typename MatrixQR::RealScalar RealScalar;
Index rows = mat.rows();
Index cols = mat.cols();
- Index size = std::min(rows,cols);
+ Index size = (std::min)(rows,cols);
eigen_assert(hCoeffs.size() == size);
@@ -250,7 +250,7 @@ void householder_qr_inplace_blocked(MatrixQR& mat, HCoeffs& hCoeffs,
Index rows = mat.rows();
Index cols = mat.cols();
- Index size = std::min(rows, cols);
+ Index size = (std::min)(rows, cols);
typedef Matrix<Scalar,Dynamic,1,ColMajor,MatrixQR::MaxColsAtCompileTime,1> TempType;
TempType tempVector;
@@ -260,12 +260,12 @@ void householder_qr_inplace_blocked(MatrixQR& mat, HCoeffs& hCoeffs,
tempData = tempVector.data();
}
- Index blockSize = std::min(maxBlockSize,size);
+ Index blockSize = (std::min)(maxBlockSize,size);
int k = 0;
for (k = 0; k < size; k += blockSize)
{
- Index bs = std::min(size-k,blockSize); // actual size of the block
+ Index bs = (std::min)(size-k,blockSize); // actual size of the block
Index tcols = cols - k - bs; // trailing columns
Index brows = rows-k; // rows of the block
@@ -299,7 +299,7 @@ struct solve_retval<HouseholderQR<_MatrixType>, Rhs>
template<typename Dest> void evalTo(Dest& dst) const
{
const Index rows = dec().rows(), cols = dec().cols();
- const Index rank = std::min(rows, cols);
+ const Index rank = (std::min)(rows, cols);
eigen_assert(rhs().rows() == rows);
typename Rhs::PlainObject c(rhs());
@@ -327,7 +327,7 @@ HouseholderQR<MatrixType>& HouseholderQR<MatrixType>::compute(const MatrixType&
{
Index rows = matrix.rows();
Index cols = matrix.cols();
- Index size = std::min(rows,cols);
+ Index size = (std::min)(rows,cols);
m_qr = matrix;
m_hCoeffs.resize(size);