Protecting remaining min/max usages with parentheses

This commit is contained in:
Michael Schmidt
2011-09-18 16:25:54 +02:00
parent af34da6438
commit 3a0d0df82d
24 changed files with 51 additions and 51 deletions

View File

@@ -64,7 +64,7 @@ template<typename MatrixType> void lu_non_invertible()
typedef Matrix<typename MatrixType::Scalar, RowsAtCompileTime, RowsAtCompileTime>
RMatrixType;
Index rank = internal::random<Index>(1, std::min(rows, cols)-1);
Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1);
// The image of the zero matrix should consist of a single (zero) column vector
VERIFY((MatrixType::Zero(rows,cols).fullPivLu().image(MatrixType::Zero(rows,cols)).cols() == 1));
@@ -84,8 +84,8 @@ template<typename MatrixType> void lu_non_invertible()
MatrixType u(rows,cols);
u = lu.matrixLU().template triangularView<Upper>();
RMatrixType l = RMatrixType::Identity(rows,rows);
l.block(0,0,rows,std::min(rows,cols)).template triangularView<StrictlyLower>()
= lu.matrixLU().block(0,0,rows,std::min(rows,cols));
l.block(0,0,rows,(std::min)(rows,cols)).template triangularView<StrictlyLower>()
= lu.matrixLU().block(0,0,rows,(std::min)(rows,cols));
VERIFY_IS_APPROX(lu.permutationP() * m1 * lu.permutationQ(), l*u);