Revert "Remove random retry loops in tests (batch 2: indices and integer types)"

This reverts merge request !2261
This commit is contained in:
Rasmus Munk Larsen
2026-03-09 20:01:53 -07:00
parent 54458cb39d
commit 42b6c43cfe
6 changed files with 95 additions and 66 deletions

View File

@@ -28,8 +28,10 @@ void jacobi(const MatrixType& m = MatrixType()) {
{
Index p = internal::random<Index>(0, rows - 1);
Index q = internal::random<Index>(0, rows - 2);
if (q >= p) ++q;
Index q;
do {
q = internal::random<Index>(0, rows - 1);
} while (q == p);
MatrixType b = a;
b.applyOnTheLeft(p, q, rot);
@@ -39,8 +41,10 @@ void jacobi(const MatrixType& m = MatrixType()) {
{
Index p = internal::random<Index>(0, cols - 1);
Index q = internal::random<Index>(0, cols - 2);
if (q >= p) ++q;
Index q;
do {
q = internal::random<Index>(0, cols - 1);
} while (q == p);
MatrixType b = a;
b.applyOnTheRight(p, q, rot);