Skip to content

Commit

Permalink
fix wonky argument order in mat_randops methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-johansson committed Jan 28, 2024
1 parent 63a0935 commit 9c26b04
Show file tree
Hide file tree
Showing 36 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion doc/source/fq_default_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/fq_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/fq_nmod_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/fq_zech_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/nmod_mat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mod_mat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mod_mat/test/t-can_solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/fmpz_mod_mat/test/t-inv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mod_mat/test/t-lu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mod_mat/test/t-nullspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mod_mat/test/t-rank.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/fmpz_mod_mat/test/t-rref.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/fmpz_mod_mat/test/t-solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions src/fq_default_mat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 870 in src/fq_default_mat.h

View check run for this annotation

Codecov / codecov/patch

src/fq_default_mat.h#L870

Added line #L870 was not covered by tests
}
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);

Check warning on line 874 in src/fq_default_mat.h

View check run for this annotation

Codecov / codecov/patch

src/fq_default_mat.h#L874

Added line #L874 was not covered by tests
}
else if (ctx->type == FQ_DEFAULT_NMOD)
{
nmod_mat_randops(mat->nmod, count, state);
nmod_mat_randops(mat->nmod, state, count);

Check warning on line 878 in src/fq_default_mat.h

View check run for this annotation

Codecov / codecov/patch

src/fq_default_mat.h#L878

Added line #L878 was not covered by tests
}
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);

Check warning on line 882 in src/fq_default_mat.h

View check run for this annotation

Codecov / codecov/patch

src/fq_default_mat.h#L882

Added line #L882 was not covered by tests
}
else
{
fq_mat_randops(mat->fq, count, state, ctx->ctx.fq);
fq_mat_randops(mat->fq, state, count, ctx->ctx.fq);

Check warning on line 886 in src/fq_default_mat.h

View check run for this annotation

Codecov / codecov/patch

src/fq_default_mat.h#L886

Added line #L886 was not covered by tests
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/fq_mat_templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/fq_mat_templates/randops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/fq_mat_templates/test/t-can_solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/fq_mat_templates/test/t-inv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/fq_mat_templates/test/t-lu_classical.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/fq_mat_templates/test/t-lu_recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/fq_mat_templates/test/t-nullspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/fq_mat_templates/test/t-rank.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions src/fq_mat_templates/test/t-solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/randops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/test/t-can_solve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/nmod_mat/test/t-det.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/nmod_mat/test/t-det_howell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/nmod_mat/test/t-inv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/test/t-lu_classical.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/test/t-lu_classical_delayed.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/test/t-lu_recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/test/t-nullspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/nmod_mat/test/t-rank.c
Original file line number Diff line number Diff line change
Expand Up @@ -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); */
Expand Down
Loading

0 comments on commit 9c26b04

Please sign in to comment.