diff --git a/Eigen/src/Core/BandMatrix.h b/Eigen/src/Core/BandMatrix.h index 67684eca3..538e6dd76 100644 --- a/Eigen/src/Core/BandMatrix.h +++ b/Eigen/src/Core/BandMatrix.h @@ -77,7 +77,7 @@ class BandMatrix : public AnyMatrixBase DataType; @@ -136,6 +136,7 @@ class BandMatrix : public AnyMatrixBase& src, const MatrixBase& dst, boo EIGEN_STATIC_ASSERT((ei_is_same_type::Scalar>::ret), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) - enum { Dimension = EIGEN_ENUM_MIN(Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) }; + enum { Dimension = EIGEN_SIZE_MIN(Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) }; typedef Matrix VectorType; typedef Matrix MatrixType; diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 148ddcd23..fe14a9080 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -487,7 +487,7 @@ struct ei_kernel_retval > { EIGEN_MAKE_KERNEL_HELPERS(FullPivLU<_MatrixType>) - enum { MaxSmallDimAtCompileTime = EIGEN_ENUM_MIN( + enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN( MatrixType::MaxColsAtCompileTime, MatrixType::MaxRowsAtCompileTime) }; @@ -572,7 +572,7 @@ struct ei_image_retval > { EIGEN_MAKE_IMAGE_HELPERS(FullPivLU<_MatrixType>) - enum { MaxSmallDimAtCompileTime = EIGEN_ENUM_MIN( + enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN( MatrixType::MaxColsAtCompileTime, MatrixType::MaxRowsAtCompileTime) }; diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index f50aa4535..809e4aad6 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -67,7 +67,7 @@ template class PartialPivLU typedef Matrix PermutationVectorType; typedef PermutationMatrix PermutationType; - enum { MaxSmallDimAtCompileTime = EIGEN_ENUM_MIN( + enum { MaxSmallDimAtCompileTime = EIGEN_SIZE_MIN( MatrixType::MaxColsAtCompileTime, MatrixType::MaxRowsAtCompileTime) }; diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index a119d0c2f..63d069081 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -51,7 +51,7 @@ template class ColPivHouseholderQR RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, - DiagSizeAtCompileTime = EIGEN_ENUM_MIN(ColsAtCompileTime,RowsAtCompileTime) + DiagSizeAtCompileTime = EIGEN_SIZE_MIN(ColsAtCompileTime,RowsAtCompileTime) }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; diff --git a/Eigen/src/QR/FullPivHouseholderQR.h b/Eigen/src/QR/FullPivHouseholderQR.h index 717ff19f8..8e8dbbbf8 100644 --- a/Eigen/src/QR/FullPivHouseholderQR.h +++ b/Eigen/src/QR/FullPivHouseholderQR.h @@ -51,7 +51,7 @@ template class FullPivHouseholderQR RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, - DiagSizeAtCompileTime = EIGEN_ENUM_MIN(ColsAtCompileTime,RowsAtCompileTime) + DiagSizeAtCompileTime = EIGEN_SIZE_MIN(ColsAtCompileTime,RowsAtCompileTime) }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; diff --git a/Eigen/src/SVD/SVD.h b/Eigen/src/SVD/SVD.h index cd8c11b8d..1d4bbe417 100644 --- a/Eigen/src/SVD/SVD.h +++ b/Eigen/src/SVD/SVD.h @@ -52,7 +52,7 @@ template class SVD ColsAtCompileTime = MatrixType::ColsAtCompileTime, PacketSize = ei_packet_traits::size, AlignmentMask = int(PacketSize)-1, - MinSize = EIGEN_ENUM_MIN(RowsAtCompileTime, ColsAtCompileTime) + MinSize = EIGEN_SIZE_MIN(RowsAtCompileTime, ColsAtCompileTime) }; typedef Matrix ColVector; diff --git a/test/lu.cpp b/test/lu.cpp index c2237febf..45308ff82 100644 --- a/test/lu.cpp +++ b/test/lu.cpp @@ -35,7 +35,7 @@ template void lu_non_invertible() int rows, cols, cols2; if(MatrixType::RowsAtCompileTime==Dynamic) { - rows = ei_random(20,200); + rows = ei_random(2,200); } else { @@ -43,8 +43,8 @@ template void lu_non_invertible() } if(MatrixType::ColsAtCompileTime==Dynamic) { - cols = ei_random(20,200); - cols2 = ei_random(20,200); + cols = ei_random(2,200); + cols2 = ei_random(2,200); } else { @@ -108,7 +108,7 @@ template void lu_invertible() LU.h */ typedef typename NumTraits::Real RealScalar; - int size = ei_random(10,200); + int size = ei_random(1,200); MatrixType m1(size, size), m2(size, size), m3(size, size); m1 = MatrixType::Random(size,size); @@ -185,5 +185,7 @@ void test_lu() CALL_SUBTEST_6( lu_non_invertible() ); CALL_SUBTEST_6( lu_invertible() ); CALL_SUBTEST_6( lu_verify_assert() ); + + CALL_SUBTEST_7(( lu_non_invertible >() )); } } diff --git a/test/submatrices.cpp b/test/submatrices.cpp index 9cd6f3fab..d53fd4b6f 100644 --- a/test/submatrices.cpp +++ b/test/submatrices.cpp @@ -60,6 +60,7 @@ template void submatrices(const MatrixType& m) typedef typename MatrixType::RealScalar RealScalar; typedef Matrix VectorType; typedef Matrix RowVectorType; + typedef Matrix SquareMatrixType; int rows = m.rows(); int cols = m.cols(); @@ -67,11 +68,9 @@ template void submatrices(const MatrixType& m) m2 = MatrixType::Random(rows, cols), m3(rows, cols), mzero = MatrixType::Zero(rows, cols), - ones = MatrixType::Ones(rows, cols), - identity = Matrix - ::Identity(rows, rows), - square = Matrix - ::Random(rows, rows); + ones = MatrixType::Ones(rows, cols); + SquareMatrixType identity = SquareMatrixType::Identity(rows, rows), + square = SquareMatrixType::Random(rows, rows); VectorType v1 = VectorType::Random(rows), v2 = VectorType::Random(rows), v3 = VectorType::Random(rows), @@ -222,6 +221,8 @@ void test_submatrices() CALL_SUBTEST_5( submatrices(MatrixXcd(20, 20)) ); CALL_SUBTEST_6( submatrices(MatrixXf(20, 20)) ); + CALL_SUBTEST_8( submatrices(Matrix(3, 4)) ); + CALL_SUBTEST_6( data_and_stride(MatrixXf(ei_random(5,50), ei_random(5,50))) ); CALL_SUBTEST_7( data_and_stride(Matrix(ei_random(5,50), ei_random(5,50))) ); }