diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-07-20 15:14:20 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-07-20 15:14:20 +0200 |
commit | 87d480d785bf8eea8ae29a0a1d049c4cdced5981 (patch) | |
tree | 1be15ae68cd1f9c35854cef3e5425778c08fc6e7 /test/qr_fullpivoting.cpp | |
parent | 772291347576e1d81191fc8fda9cf214aba6f852 (diff) |
Make use of EIGEN_TEST_MAX_SIZE
Diffstat (limited to 'test/qr_fullpivoting.cpp')
-rw-r--r-- | test/qr_fullpivoting.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp index d82e123d0..05a705887 100644 --- a/test/qr_fullpivoting.cpp +++ b/test/qr_fullpivoting.cpp @@ -15,8 +15,12 @@ template<typename MatrixType> void qr() { typedef typename MatrixType::Index Index; - Index rows = internal::random<Index>(20,200), cols = internal::random<int>(20,200), cols2 = internal::random<int>(20,200); - Index rank = internal::random<Index>(1, (std::min)(rows, cols)-1); + Index max_size = EIGEN_TEST_MAX_SIZE; + Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10); + Index rows = internal::random<Index>(min_size,max_size), + cols = internal::random<Index>(min_size,max_size), + cols2 = internal::random<Index>(min_size,max_size), + rank = internal::random<Index>(1, (std::min)(rows, cols)-1); typedef typename MatrixType::Scalar Scalar; typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> MatrixQType; @@ -59,7 +63,9 @@ template<typename MatrixType> void qr_invertible() typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar; typedef typename MatrixType::Scalar Scalar; - int size = internal::random<int>(10,50); + Index max_size = numext::mini(50,EIGEN_TEST_MAX_SIZE); + Index min_size = numext::maxi(1,EIGEN_TEST_MAX_SIZE/10); + Index size = internal::random<Index>(min_size,max_size); MatrixType m1(size, size), m2(size, size), m3(size, size); m1 = MatrixType::Random(size,size); |