diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-08-19 14:18:05 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-08-19 14:18:05 +0200 |
commit | 42e2578ef9fcbb62ad6e07933ccf531f6f7cd1b3 (patch) | |
tree | 90cef174284cad35f0d13d4b991db83335554caf /test/lu.cpp | |
parent | 5734ee6df42991e59609ffd26aaeb3c7aacd61e2 (diff) |
the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
Diffstat (limited to 'test/lu.cpp')
-rw-r--r-- | test/lu.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lu.cpp b/test/lu.cpp index 46512405e..253f68542 100644 --- a/test/lu.cpp +++ b/test/lu.cpp @@ -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); |