diff --git a/doc/source/fq_default_mat.rst b/doc/source/fq_default_mat.rst index 78f0c84b83..2ce33cb0eb 100644 --- a/doc/source/fq_default_mat.rst +++ b/doc/source/fq_default_mat.rst @@ -207,7 +207,7 @@ Random matrix generation The matrix can be transformed into a dense matrix with unchanged rank by subsequently calling :func:`fq_default_mat_randops`. -.. function:: void fq_default_mat_randops(fq_default_mat_t mat, slong count, flint_rand_t state, const fq_default_ctx_t ctx) +.. function:: void fq_default_mat_randops(fq_default_mat_t mat, flint_rand_t state, slong count, const fq_default_ctx_t ctx) Randomises ``mat`` by performing elementary row or column operations. More precisely, at most ``count`` random additions diff --git a/doc/source/fq_mat.rst b/doc/source/fq_mat.rst index d20667eef1..67598dff8d 100644 --- a/doc/source/fq_mat.rst +++ b/doc/source/fq_mat.rst @@ -204,7 +204,7 @@ Random matrix generation The matrix can be transformed into a dense matrix with unchanged rank by subsequently calling :func:`fq_mat_randops`. -.. function:: void fq_mat_randops(fq_mat_t mat, slong count, flint_rand_t state, const fq_ctx_t ctx) +.. function:: void fq_mat_randops(fq_mat_t mat, flint_rand_t state, slong count, const fq_ctx_t ctx) Randomises ``mat`` by performing elementary row or column operations. More precisely, at most ``count`` random additions diff --git a/doc/source/fq_nmod_mat.rst b/doc/source/fq_nmod_mat.rst index e3f435b894..322cf30757 100644 --- a/doc/source/fq_nmod_mat.rst +++ b/doc/source/fq_nmod_mat.rst @@ -203,7 +203,7 @@ Random matrix generation The matrix can be transformed into a dense matrix with unchanged rank by subsequently calling :func:`fq_nmod_mat_randops`. -.. function:: void fq_nmod_mat_randops(fq_nmod_mat_t mat, slong count, flint_rand_t state, const fq_nmod_ctx_t ctx) +.. function:: void fq_nmod_mat_randops(fq_nmod_mat_t mat, flint_rand_t state, slong count, const fq_nmod_ctx_t ctx) Randomises ``mat`` by performing elementary row or column operations. More precisely, at most ``count`` random additions diff --git a/doc/source/fq_zech_mat.rst b/doc/source/fq_zech_mat.rst index c89cde0db2..5d7363aeba 100644 --- a/doc/source/fq_zech_mat.rst +++ b/doc/source/fq_zech_mat.rst @@ -181,7 +181,7 @@ Random matrix generation The matrix can be transformed into a dense matrix with unchanged rank by subsequently calling :func:`fq_zech_mat_randops`. -.. function:: void fq_zech_mat_randops(fq_zech_mat_t mat, slong count, flint_rand_t state, const fq_zech_ctx_t ctx) +.. function:: void fq_zech_mat_randops(fq_zech_mat_t mat, flint_rand_t state, slong count, const fq_zech_ctx_t ctx) Randomises ``mat`` by performing elementary row or column operations. More precisely, at most ``count`` random additions diff --git a/doc/source/nmod_mat.rst b/doc/source/nmod_mat.rst index d7882be139..1c40220535 100644 --- a/doc/source/nmod_mat.rst +++ b/doc/source/nmod_mat.rst @@ -213,7 +213,7 @@ Random matrix generation The matrix can be transformed into a dense matrix with unchanged rank by subsequently calling :func:`nmod_mat_randops`. -.. function:: void nmod_mat_randops(nmod_mat_t mat, slong count, flint_rand_t state) +.. function:: void nmod_mat_randops(nmod_mat_t mat, flint_rand_t state, slong count) Randomises ``mat`` by performing elementary row or column operations. More precisely, at most ``count`` random additions diff --git a/src/fmpz_mod_mat.h b/src/fmpz_mod_mat.h index 67f7aea3c6..7ed9e32479 100644 --- a/src/fmpz_mod_mat.h +++ b/src/fmpz_mod_mat.h @@ -106,7 +106,7 @@ void fmpz_mod_mat_randtril(fmpz_mod_mat_t mat, flint_rand_t state, int unit, con void fmpz_mod_mat_randtriu(fmpz_mod_mat_t mat, flint_rand_t state, int unit, const fmpz_mod_ctx_t ctx); FMPZ_MOD_MAT_INLINE -void fmpz_mod_mat_randops(fmpz_mod_mat_t mat, slong count, flint_rand_t state, const fmpz_mod_ctx_t ctx) +void fmpz_mod_mat_randops(fmpz_mod_mat_t mat, flint_rand_t state, slong count, const fmpz_mod_ctx_t ctx) { fmpz_mat_randops(mat, state, count); _fmpz_mod_mat_reduce(mat, ctx); diff --git a/src/fmpz_mod_mat/test/t-can_solve.c b/src/fmpz_mod_mat/test/t-can_solve.c index 072efc3333..6ab4fe59c9 100644 --- a/src/fmpz_mod_mat/test/t-can_solve.c +++ b/src/fmpz_mod_mat/test/t-can_solve.c @@ -43,7 +43,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_can_solve, state) /* Dense */ if (n_randint(state, 2)) - fmpz_mod_mat_randops(A, 1+n_randint(state, 1+m*m), state, ctx); + fmpz_mod_mat_randops(A, state, 1+n_randint(state, 1+m*m), ctx); solved = fmpz_mod_mat_can_solve(X, A, B, ctx); fmpz_mod_mat_mul(AX, A, X, ctx); diff --git a/src/fmpz_mod_mat/test/t-inv.c b/src/fmpz_mod_mat/test/t-inv.c index 58a2e95020..726e3d3aaa 100644 --- a/src/fmpz_mod_mat/test/t-inv.c +++ b/src/fmpz_mod_mat/test/t-inv.c @@ -41,7 +41,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_inv, state) fmpz_mod_mat_randrank(A, state, m, ctx); /* Dense or sparse? */ if (n_randint(state, 2)) - fmpz_mod_mat_randops(A, 1+n_randint(state, 1+m*m), state, ctx); + fmpz_mod_mat_randops(A, state, 1+n_randint(state, 1+m*m), ctx); result = fmpz_mod_mat_inv(B, A, ctx); fmpz_mod_mat_mul(C, A, B, ctx); @@ -75,7 +75,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_inv, state) /* Dense */ if (n_randint(state, 2)) - fmpz_mod_mat_randops(A, 1+n_randint(state, 1+m*m), state, ctx); + fmpz_mod_mat_randops(A, state, 1+n_randint(state, 1+m*m), ctx); FLINT_TEST(!fmpz_mod_mat_inv(B, A, ctx)); FLINT_TEST(!fmpz_mod_mat_inv(A, A, ctx)); diff --git a/src/fmpz_mod_mat/test/t-lu.c b/src/fmpz_mod_mat/test/t-lu.c index 51b37e7b74..7bcc9f6662 100644 --- a/src/fmpz_mod_mat/test/t-lu.c +++ b/src/fmpz_mod_mat/test/t-lu.c @@ -100,7 +100,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_lu, state) if (n_randint(state, 2)) { d = n_randint(state, 2 * m * n + 1); - fmpz_mod_mat_randops(A, d, state, ctx); + fmpz_mod_mat_randops(A, state, d, ctx); } fmpz_mod_mat_init_set(LU, A, ctx); diff --git a/src/fmpz_mod_mat/test/t-nullspace.c b/src/fmpz_mod_mat/test/t-nullspace.c index f3be0049dc..00b8521511 100644 --- a/src/fmpz_mod_mat/test/t-nullspace.c +++ b/src/fmpz_mod_mat/test/t-nullspace.c @@ -41,7 +41,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_nullspace, state) fmpz_mod_mat_randrank(A, state, r, ctx); /* Densify */ if (n_randlimb(state) % 2) - fmpz_mod_mat_randops(A, d, state, ctx); + fmpz_mod_mat_randops(A, state, d, ctx); nullity = fmpz_mod_mat_nullspace(ker, A, ctx); nulrank = fmpz_mod_mat_rank(ker, ctx); diff --git a/src/fmpz_mod_mat/test/t-rank.c b/src/fmpz_mod_mat/test/t-rank.c index 4841fd35bb..5eaf286adc 100644 --- a/src/fmpz_mod_mat/test/t-rank.c +++ b/src/fmpz_mod_mat/test/t-rank.c @@ -51,7 +51,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_rank, state) d = n_randint(state, 2 * m * n + 1); fmpz_mod_mat_init(A, m, n, ctx); fmpz_mod_mat_randrank(A, state, r, ctx); - fmpz_mod_mat_randops(A, d, state, ctx); + fmpz_mod_mat_randops(A, state, d, ctx); FLINT_TEST(r == fmpz_mod_mat_rank(A, ctx)); fmpz_mod_mat_clear(A, ctx); } diff --git a/src/fmpz_mod_mat/test/t-rref.c b/src/fmpz_mod_mat/test/t-rref.c index 0c952b2c86..6420fd79b4 100644 --- a/src/fmpz_mod_mat/test/t-rref.c +++ b/src/fmpz_mod_mat/test/t-rref.c @@ -110,7 +110,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_rref, state) fmpz_mod_mat_init(A, m, n, ctx); fmpz_mod_mat_randrank(A, state, r, ctx); - fmpz_mod_mat_randops(A, d, state, ctx); + fmpz_mod_mat_randops(A, state, d, ctx); rank = fmpz_mod_mat_rref(perm, A, ctx); diff --git a/src/fmpz_mod_mat/test/t-solve.c b/src/fmpz_mod_mat/test/t-solve.c index e9a953e618..fb7c3d0eb4 100644 --- a/src/fmpz_mod_mat/test/t-solve.c +++ b/src/fmpz_mod_mat/test/t-solve.c @@ -40,7 +40,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_solve, state) /* Dense */ if (n_randint(state, 2)) - fmpz_mod_mat_randops(A, 1+n_randint(state, 1+m*m), state, ctx); + fmpz_mod_mat_randops(A, state, 1+n_randint(state, 1+m*m), ctx); solved = fmpz_mod_mat_solve(X, A, B, ctx); fmpz_mod_mat_mul(AX, A, X, ctx); @@ -72,7 +72,7 @@ TEST_FUNCTION_START(fmpz_mod_mat_solve, state) /* Dense */ if (n_randint(state, 2)) - fmpz_mod_mat_randops(A, 1+n_randint(state, 1+m*m), state, ctx); + fmpz_mod_mat_randops(A, state, 1+n_randint(state, 1+m*m), ctx); solved = fmpz_mod_mat_solve(X, A, B, ctx); FLINT_TEST(!solved); diff --git a/src/fq_default_mat.h b/src/fq_default_mat.h index 96489c086d..32dd684b4e 100644 --- a/src/fq_default_mat.h +++ b/src/fq_default_mat.h @@ -863,27 +863,27 @@ FQ_DEFAULT_MAT_INLINE void fq_default_mat_randrank(fq_default_mat_t mat, FQ_DEFAULT_MAT_INLINE void fq_default_mat_randops(fq_default_mat_t mat, - slong count, flint_rand_t state, const fq_default_ctx_t ctx) + flint_rand_t state, slong count, const fq_default_ctx_t ctx) { if (ctx->type == FQ_DEFAULT_FQ_ZECH) { - fq_zech_mat_randops(mat->fq_zech, count, state, ctx->ctx.fq_zech); + fq_zech_mat_randops(mat->fq_zech, state, count, ctx->ctx.fq_zech); } else if (ctx->type == FQ_DEFAULT_FQ_NMOD) { - fq_nmod_mat_randops(mat->fq_nmod, count, state, ctx->ctx.fq_nmod); + fq_nmod_mat_randops(mat->fq_nmod, state, count, ctx->ctx.fq_nmod); } else if (ctx->type == FQ_DEFAULT_NMOD) { - nmod_mat_randops(mat->nmod, count, state); + nmod_mat_randops(mat->nmod, state, count); } else if (ctx->type == FQ_DEFAULT_FMPZ_MOD) { - fmpz_mod_mat_randops(mat->fmpz_mod, count, state, ctx->ctx.fmpz_mod.mod); + fmpz_mod_mat_randops(mat->fmpz_mod, state, count, ctx->ctx.fmpz_mod.mod); } else { - fq_mat_randops(mat->fq, count, state, ctx->ctx.fq); + fq_mat_randops(mat->fq, state, count, ctx->ctx.fq); } } diff --git a/src/fq_mat_templates.h b/src/fq_mat_templates.h index 34e602ca24..942e7b920b 100644 --- a/src/fq_mat_templates.h +++ b/src/fq_mat_templates.h @@ -169,8 +169,8 @@ int TEMPLATE(T, mat_randpermdiag)(TEMPLATE(T, mat_t) mat, flint_rand_t state, TEMPLATE(T, struct) * diag, slong n, const TEMPLATE(T, ctx_t) ctx); -void TEMPLATE(T, mat_randops)(TEMPLATE(T, mat_t) mat, slong count, - flint_rand_t state, const TEMPLATE(T, ctx_t) ctx); +void TEMPLATE(T, mat_randops)(TEMPLATE(T, mat_t) mat, + flint_rand_t state, slong count, const TEMPLATE(T, ctx_t) ctx); void TEMPLATE(T, mat_randtril)(TEMPLATE(T, mat_t) mat, flint_rand_t state, int unit, const TEMPLATE(T, ctx_t) ctx); diff --git a/src/fq_mat_templates/randops.c b/src/fq_mat_templates/randops.c index 18e70a0290..bb3845cbf1 100644 --- a/src/fq_mat_templates/randops.c +++ b/src/fq_mat_templates/randops.c @@ -15,8 +15,8 @@ #include "templates.h" void -TEMPLATE(T, mat_randops) (TEMPLATE(T, mat_t) mat, slong count, - flint_rand_t state, const TEMPLATE(T, ctx_t) ctx) +TEMPLATE(T, mat_randops) (TEMPLATE(T, mat_t) mat, + flint_rand_t state, slong count, const TEMPLATE(T, ctx_t) ctx) { slong c, i, j, k; slong m = mat->r; diff --git a/src/fq_mat_templates/test/t-can_solve.c b/src/fq_mat_templates/test/t-can_solve.c index 7684088ffc..e3826be8d2 100644 --- a/src/fq_mat_templates/test/t-can_solve.c +++ b/src/fq_mat_templates/test/t-can_solve.c @@ -43,7 +43,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_can_solve, state) /* Dense */ if (n_randint(state, 2)) - TEMPLATE(T, mat_randops)(A, 1+n_randint(state, 1+m*m), state, ctx); + TEMPLATE(T, mat_randops)(A, state, 1+n_randint(state, 1+m*m), ctx); solved = TEMPLATE(T, mat_can_solve)(X, A, B, ctx); diff --git a/src/fq_mat_templates/test/t-inv.c b/src/fq_mat_templates/test/t-inv.c index 3022c6c84f..38560360eb 100644 --- a/src/fq_mat_templates/test/t-inv.c +++ b/src/fq_mat_templates/test/t-inv.c @@ -40,7 +40,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_inv, state) TEMPLATE(T, mat_randrank)(A, state, m, ctx); /* Dense or sparse? */ if (n_randint(state, 2)) - TEMPLATE(T, mat_randops)(A, 1+n_randint(state, 1+m*m), state, ctx); + TEMPLATE(T, mat_randops)(A, state, 1+n_randint(state, 1+m*m), ctx); result = TEMPLATE(T, mat_inv)(B, A, ctx); TEMPLATE(T, mat_mul)(C, A, B, ctx); @@ -96,7 +96,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_inv, state) /* Dense */ if (n_randint(state, 2)) - TEMPLATE(T, mat_randops)(A, 1+n_randint(state, 1+m*m), state, ctx); + TEMPLATE(T, mat_randops)(A, state, 1+n_randint(state, 1+m*m), ctx); result = TEMPLATE(T, mat_inv)(B, A, ctx); diff --git a/src/fq_mat_templates/test/t-lu_classical.c b/src/fq_mat_templates/test/t-lu_classical.c index f231848ad0..be914caddb 100644 --- a/src/fq_mat_templates/test/t-lu_classical.c +++ b/src/fq_mat_templates/test/t-lu_classical.c @@ -131,7 +131,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_lu_classical, state) if (n_randint(state, 2)) { d = n_randint(state, 2 * m * n + 1); - TEMPLATE(T, mat_randops) (A, d, state, ctx); + TEMPLATE(T, mat_randops) (A, state, d, ctx); } TEMPLATE(T, mat_init_set) (LU, A, ctx); diff --git a/src/fq_mat_templates/test/t-lu_recursive.c b/src/fq_mat_templates/test/t-lu_recursive.c index 04a3f9be90..9d589c9efc 100644 --- a/src/fq_mat_templates/test/t-lu_recursive.c +++ b/src/fq_mat_templates/test/t-lu_recursive.c @@ -131,7 +131,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_lu_recursive, state) if (n_randint(state, 2)) { d = n_randint(state, 2 * m * n + 1); - TEMPLATE(T, mat_randops) (A, d, state, ctx); + TEMPLATE(T, mat_randops) (A, state, d, ctx); } TEMPLATE(T, mat_init_set) (LU, A, ctx); diff --git a/src/fq_mat_templates/test/t-nullspace.c b/src/fq_mat_templates/test/t-nullspace.c index 8ea64dd736..f1eaf7fc3e 100644 --- a/src/fq_mat_templates/test/t-nullspace.c +++ b/src/fq_mat_templates/test/t-nullspace.c @@ -41,7 +41,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_nullspace, state) TEMPLATE(T, mat_randrank) (A, state, r, ctx); /* Densify */ if (n_randlimb(state) % 2) - TEMPLATE(T, mat_randops) (A, d, state, ctx); + TEMPLATE(T, mat_randops) (A, state, d, ctx); nullity = TEMPLATE(T, mat_nullspace) (ker, A, ctx); nulrank = TEMPLATE(T, mat_rank) (ker, ctx); diff --git a/src/fq_mat_templates/test/t-rank.c b/src/fq_mat_templates/test/t-rank.c index 4159ec4b8c..2be105b65e 100644 --- a/src/fq_mat_templates/test/t-rank.c +++ b/src/fq_mat_templates/test/t-rank.c @@ -57,7 +57,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_rank, state) d = n_randint(state, 2 * m * n + 1); TEMPLATE(T, mat_init) (A, m, n, ctx); TEMPLATE(T, mat_randrank) (A, state, r, ctx); - TEMPLATE(T, mat_randops) (A, d, state, ctx); + TEMPLATE(T, mat_randops) (A, state, d, ctx); if (r != TEMPLATE(T, mat_rank) (A, ctx)) { flint_printf("FAIL:\n"); diff --git a/src/fq_mat_templates/test/t-solve.c b/src/fq_mat_templates/test/t-solve.c index a5752add5f..9798181485 100644 --- a/src/fq_mat_templates/test/t-solve.c +++ b/src/fq_mat_templates/test/t-solve.c @@ -40,7 +40,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_solve, state) /* Dense */ if (n_randint(state, 2)) - TEMPLATE(T, mat_randops)(A, 1+n_randint(state, 1+m*m), state, ctx); + TEMPLATE(T, mat_randops)(A, state, 1+n_randint(state, 1+m*m), ctx); solved = TEMPLATE(T, mat_solve)(X, A, B, ctx); @@ -89,7 +89,7 @@ TEST_TEMPLATE_FUNCTION_START(T, mat_solve, state) /* Dense */ if (n_randint(state, 2)) - TEMPLATE(T, mat_randops)(A, 1+n_randint(state, 1+m*m), state, ctx); + TEMPLATE(T, mat_randops)(A, state, 1+n_randint(state, 1+m*m), ctx); solved = TEMPLATE(T, mat_solve)(X, A, B, ctx); diff --git a/src/nmod_mat.h b/src/nmod_mat.h index 86af2283ad..4362f79da4 100644 --- a/src/nmod_mat.h +++ b/src/nmod_mat.h @@ -94,7 +94,7 @@ void nmod_mat_randfull(nmod_mat_t mat, flint_rand_t state); int nmod_mat_randpermdiag(nmod_mat_t mat, flint_rand_t state, mp_srcptr diag, slong n); void nmod_mat_randrank(nmod_mat_t, flint_rand_t state, slong rank); -void nmod_mat_randops(nmod_mat_t mat, slong count, flint_rand_t state); +void nmod_mat_randops(nmod_mat_t mat, flint_rand_t state, slong count); void nmod_mat_randtril(nmod_mat_t mat, flint_rand_t state, int unit); void nmod_mat_randtriu(nmod_mat_t mat, flint_rand_t state, int unit); diff --git a/src/nmod_mat/randops.c b/src/nmod_mat/randops.c index 489704c793..4be27f7c4d 100644 --- a/src/nmod_mat/randops.c +++ b/src/nmod_mat/randops.c @@ -13,7 +13,7 @@ #include "nmod_mat.h" void -nmod_mat_randops(nmod_mat_t mat, slong count, flint_rand_t state) +nmod_mat_randops(nmod_mat_t mat, flint_rand_t state, slong count) { slong c, i, j, k; slong m = mat->r; diff --git a/src/nmod_mat/test/t-can_solve.c b/src/nmod_mat/test/t-can_solve.c index 20af454006..34bd8f5cc7 100644 --- a/src/nmod_mat/test/t-can_solve.c +++ b/src/nmod_mat/test/t-can_solve.c @@ -39,7 +39,7 @@ TEST_FUNCTION_START(nmod_mat_can_solve, state) /* Dense */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); solved = nmod_mat_can_solve(X, A, B); diff --git a/src/nmod_mat/test/t-det.c b/src/nmod_mat/test/t-det.c index 471f0aac84..6cee4f5837 100644 --- a/src/nmod_mat/test/t-det.c +++ b/src/nmod_mat/test/t-det.c @@ -37,13 +37,13 @@ TEST_FUNCTION_START(nmod_mat_det, state) { case 0: nmod_mat_randrank(A, state, m); - nmod_mat_randops(A, n_randint(state, 2*m + 1), state); + nmod_mat_randops(A, state, n_randint(state, 2*m + 1)); break; case 1: t = n_randint(state, m); t = FLINT_MIN(t, m); nmod_mat_randrank(A, state, t); - nmod_mat_randops(A, n_randint(state, 2*m + 1), state); + nmod_mat_randops(A, state, n_randint(state, 2*m + 1)); break; default: nmod_mat_randtest(A, state); diff --git a/src/nmod_mat/test/t-det_howell.c b/src/nmod_mat/test/t-det_howell.c index d7b4224efa..f1e6d7298b 100644 --- a/src/nmod_mat/test/t-det_howell.c +++ b/src/nmod_mat/test/t-det_howell.c @@ -37,13 +37,13 @@ TEST_FUNCTION_START(nmod_mat_det_howell, state) { case 0: nmod_mat_randrank(A, state, m); - nmod_mat_randops(A, n_randint(state, 2*m + 1), state); + nmod_mat_randops(A, state, n_randint(state, 2*m + 1)); break; case 1: t = n_randint(state, m); t = FLINT_MIN(t, m); nmod_mat_randrank(A, state, t); - nmod_mat_randops(A, n_randint(state, 2*m + 1), state); + nmod_mat_randops(A, state, n_randint(state, 2*m + 1)); break; default: nmod_mat_randtest(A, state); diff --git a/src/nmod_mat/test/t-inv.c b/src/nmod_mat/test/t-inv.c index 9fbe3fce8c..da89cbb4a7 100644 --- a/src/nmod_mat/test/t-inv.c +++ b/src/nmod_mat/test/t-inv.c @@ -38,7 +38,7 @@ TEST_FUNCTION_START(nmod_mat_inv, state) nmod_mat_randrank(A, state, m); /* Dense or sparse? */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); result = nmod_mat_inv(B, A); nmod_mat_mul(C, A, B); @@ -82,7 +82,7 @@ TEST_FUNCTION_START(nmod_mat_inv, state) /* Dense */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); result = nmod_mat_inv(B, A); diff --git a/src/nmod_mat/test/t-lu_classical.c b/src/nmod_mat/test/t-lu_classical.c index 872a271b2d..3a5cfbaed1 100644 --- a/src/nmod_mat/test/t-lu_classical.c +++ b/src/nmod_mat/test/t-lu_classical.c @@ -103,7 +103,7 @@ TEST_FUNCTION_START(nmod_mat_lu_classical, state) if (n_randint(state, 2)) { d = n_randint(state, 2*m*n + 1); - nmod_mat_randops(A, d, state); + nmod_mat_randops(A, state, d); } nmod_mat_init_set(LU, A); diff --git a/src/nmod_mat/test/t-lu_classical_delayed.c b/src/nmod_mat/test/t-lu_classical_delayed.c index 6c16878038..2a612c6259 100644 --- a/src/nmod_mat/test/t-lu_classical_delayed.c +++ b/src/nmod_mat/test/t-lu_classical_delayed.c @@ -105,7 +105,7 @@ TEST_FUNCTION_START(nmod_mat_lu_classical_delayed, state) if (n_randint(state, 2)) { d = n_randint(state, 2*m*n + 1); - nmod_mat_randops(A, d, state); + nmod_mat_randops(A, state, d); } nmod_mat_init_set(LU, A); diff --git a/src/nmod_mat/test/t-lu_recursive.c b/src/nmod_mat/test/t-lu_recursive.c index 348c740d03..5db4188a4d 100644 --- a/src/nmod_mat/test/t-lu_recursive.c +++ b/src/nmod_mat/test/t-lu_recursive.c @@ -103,7 +103,7 @@ TEST_FUNCTION_START(nmod_mat_lu_recursive, state) if (n_randint(state, 2)) { d = n_randint(state, 2*m*n + 1); - nmod_mat_randops(A, d, state); + nmod_mat_randops(A, state, d); } nmod_mat_init_set(LU, A); diff --git a/src/nmod_mat/test/t-nullspace.c b/src/nmod_mat/test/t-nullspace.c index 513b5c51df..c0212cd5a3 100644 --- a/src/nmod_mat/test/t-nullspace.c +++ b/src/nmod_mat/test/t-nullspace.c @@ -38,7 +38,7 @@ TEST_FUNCTION_START(nmod_mat_nullspace, state) nmod_mat_randrank(A, state, r); /* Densify */ if (n_randlimb(state) % 2) - nmod_mat_randops(A, d, state); + nmod_mat_randops(A, state, d); nullity = nmod_mat_nullspace(ker, A); nulrank = nmod_mat_rank(ker); diff --git a/src/nmod_mat/test/t-rank.c b/src/nmod_mat/test/t-rank.c index 64b1e49076..f184135145 100644 --- a/src/nmod_mat/test/t-rank.c +++ b/src/nmod_mat/test/t-rank.c @@ -51,7 +51,7 @@ TEST_FUNCTION_START(nmod_mat_rank, state) d = n_randint(state, 2*m*n + 1); nmod_mat_init(A, m, n, mod); nmod_mat_randrank(A, state, r); - nmod_mat_randops(A, d, state); + nmod_mat_randops(A, state, d); /* flint_printf("DENSE %wd %wd\n", r, d); nmod_mat_print_pretty(A); */ diff --git a/src/nmod_mat/test/t-solve.c b/src/nmod_mat/test/t-solve.c index 8932944394..ae38f7929f 100644 --- a/src/nmod_mat/test/t-solve.c +++ b/src/nmod_mat/test/t-solve.c @@ -36,7 +36,7 @@ TEST_FUNCTION_START(nmod_mat_solve, state) /* Dense */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); solved = nmod_mat_solve(X, A, B); @@ -75,7 +75,7 @@ TEST_FUNCTION_START(nmod_mat_solve, state) /* Dense */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); solved = nmod_mat_solve(X, A, B); diff --git a/src/nmod_mat/test/t-solve_vec.c b/src/nmod_mat/test/t-solve_vec.c index cccba50cc0..c1182eb3ad 100644 --- a/src/nmod_mat/test/t-solve_vec.c +++ b/src/nmod_mat/test/t-solve_vec.c @@ -35,7 +35,7 @@ TEST_FUNCTION_START(nmod_mat_solve_vec, state) /* Dense */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); solved = nmod_mat_solve_vec(x->entries, A, b->entries); nmod_mat_mul(Ax, A, x); @@ -72,7 +72,7 @@ TEST_FUNCTION_START(nmod_mat_solve_vec, state) /* Dense */ if (n_randint(state, 2)) - nmod_mat_randops(A, 1+n_randint(state, 1+m*m), state); + nmod_mat_randops(A, state, 1+n_randint(state, 1+m*m)); solved = nmod_mat_solve_vec(x->entries, A, b->entries);