mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Revert "Remove random retry loops in tests (batch 2: indices and integer types)"
This reverts merge request !2261
This commit is contained in:
@@ -27,8 +27,10 @@ void determinant(const MatrixType& m) {
|
||||
VERIFY_IS_APPROX((m1 * m2).eval().determinant(), m1.determinant() * m2.determinant());
|
||||
if (size == 1) return;
|
||||
Index i = internal::random<Index>(0, size - 1);
|
||||
Index j = internal::random<Index>(0, size - 2);
|
||||
if (j >= i) ++j;
|
||||
Index j;
|
||||
do {
|
||||
j = internal::random<Index>(0, size - 1);
|
||||
} while (j == i);
|
||||
m2 = m1;
|
||||
m2.row(i).swap(m2.row(j));
|
||||
VERIFY_IS_APPROX(m2.determinant(), -m1.determinant());
|
||||
|
||||
Reference in New Issue
Block a user