mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
EIGEN_ENUM_MIN ---> EIGEN_SIZE_MIN
This commit is contained in:
10
test/lu.cpp
10
test/lu.cpp
@@ -35,7 +35,7 @@ template<typename MatrixType> void lu_non_invertible()
|
||||
int rows, cols, cols2;
|
||||
if(MatrixType::RowsAtCompileTime==Dynamic)
|
||||
{
|
||||
rows = ei_random<int>(20,200);
|
||||
rows = ei_random<int>(2,200);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -43,8 +43,8 @@ template<typename MatrixType> void lu_non_invertible()
|
||||
}
|
||||
if(MatrixType::ColsAtCompileTime==Dynamic)
|
||||
{
|
||||
cols = ei_random<int>(20,200);
|
||||
cols2 = ei_random<int>(20,200);
|
||||
cols = ei_random<int>(2,200);
|
||||
cols2 = ei_random<int>(2,200);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -108,7 +108,7 @@ template<typename MatrixType> void lu_invertible()
|
||||
LU.h
|
||||
*/
|
||||
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
|
||||
int size = ei_random<int>(10,200);
|
||||
int size = ei_random<int>(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<MatrixXcd>() );
|
||||
CALL_SUBTEST_6( lu_invertible<MatrixXcd>() );
|
||||
CALL_SUBTEST_6( lu_verify_assert<MatrixXcd>() );
|
||||
|
||||
CALL_SUBTEST_7(( lu_non_invertible<Matrix<float,Dynamic,16> >() ));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ template<typename MatrixType> void submatrices(const MatrixType& m)
|
||||
typedef typename MatrixType::RealScalar RealScalar;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||
typedef Matrix<Scalar, 1, MatrixType::ColsAtCompileTime> RowVectorType;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;
|
||||
int rows = m.rows();
|
||||
int cols = m.cols();
|
||||
|
||||
@@ -67,11 +68,9 @@ template<typename MatrixType> 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<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
|
||||
::Identity(rows, rows),
|
||||
square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
|
||||
::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<float,Dynamic,4>(3, 4)) );
|
||||
|
||||
CALL_SUBTEST_6( data_and_stride(MatrixXf(ei_random(5,50), ei_random(5,50))) );
|
||||
CALL_SUBTEST_7( data_and_stride(Matrix<int,Dynamic,Dynamic,RowMajor>(ei_random(5,50), ei_random(5,50))) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user