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

libeigen/eigen!2261

Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
Rasmus Munk Larsen
2026-03-08 11:02:45 -07:00
parent be7538ed65
commit 7c3a344763
6 changed files with 66 additions and 95 deletions

View File

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