Skip to content

Commit 5476e2a

Browse files
Merge pull request #1755 from flintlib/fmpz_mod3
Further fmpz_mod_mat cleanup
2 parents 9cb68f9 + 03be007 commit 5476e2a

File tree

30 files changed

+168
-594
lines changed

30 files changed

+168
-594
lines changed

doc/source/fmpz_mat.rst

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,21 +1147,6 @@ Row reduction
11471147
``rank``, returns 1 if so and 0 otherwise.
11481148

11491149

1150-
Modular gaussian elimination
1151-
--------------------------------------------------------------------------------
1152-
1153-
1154-
.. function:: slong fmpz_mat_rref_mod(slong * perm, fmpz_mat_t A, const fmpz_t p)
1155-
1156-
Uses fraction-free Gauss-Jordan elimination to set ``A``
1157-
to its reduced row echelon form and returns the rank of ``A``.
1158-
All computations are done modulo p.
1159-
1160-
Pivot elements are chosen with ``fmpz_mat_find_pivot_any``.
1161-
If ``perm`` is non-``NULL``, the permutation of
1162-
rows in the matrix will also be applied to ``perm``.
1163-
1164-
11651150
Strong echelon form and Howell form
11661151
--------------------------------------------------------------------------------
11671152

doc/source/fmpz_mod_mat.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,10 @@ Gaussian elimination
262262
--------------------------------------------------------------------------------
263263

264264

265-
.. function:: slong fmpz_mod_mat_rref(slong * perm, fmpz_mod_mat_t mat, const fmpz_mod_ctx_t ctx)
265+
.. function:: slong fmpz_mod_mat_rref(fmpz_mod_mat_t res, const fmpz_mod_mat_t mat, const fmpz_mod_ctx_t ctx)
266266

267-
Uses Gauss-Jordan elimination to set ``mat`` to its reduced row echelon
268-
form and returns the rank of ``mat``.
269-
270-
If ``perm`` is non-``NULL``, the permutation of
271-
rows in the matrix will also be applied to ``perm``.
267+
Sets ``res`` to the reduced row echelon form of ``mat``
268+
and returns the rank.
272269

273270
The modulus is assumed to be prime.
274271

doc/source/fq_default_mat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ Reduced row echelon form
338338
--------------------------------------------------------------------------------
339339

340340

341-
.. function:: slong fq_default_mat_rref(fq_default_mat_t A, const fq_default_ctx_t ctx)
341+
.. function:: slong fq_default_mat_rref(fq_default_mat_t B, const fq_default_mat_t A, const fq_default_ctx_t ctx)
342342

343-
Puts `A` in reduced row echelon form and returns the rank of `A`.
343+
Puts `B` in reduced row echelon form and returns the rank of `A`.
344344

345345
The rref is computed by first obtaining an unreduced row echelon
346346
form via LU decomposition and then solving an additional

doc/source/fq_mat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ Reduced row echelon form
377377
--------------------------------------------------------------------------------
378378

379379

380-
.. function:: slong fq_mat_rref(fq_mat_t A, const fq_ctx_t ctx)
380+
.. function:: slong fq_mat_rref(fq_mat_t B, const fq_mat_t A, const fq_ctx_t ctx)
381381

382-
Puts `A` in reduced row echelon form and returns the rank of `A`.
382+
Puts `B` in reduced row echelon form and returns the rank of `A`.
383383

384384
The rref is computed by first obtaining an unreduced row echelon
385385
form via LU decomposition and then solving an additional

doc/source/fq_nmod_mat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,9 @@ Reduced row echelon form
376376
--------------------------------------------------------------------------------
377377

378378

379-
.. function:: slong fq_nmod_mat_rref(fq_nmod_mat_t A, const fq_nmod_ctx_t ctx)
379+
.. function:: slong fq_nmod_mat_rref(fq_nmod_mat_t B, const fq_nmod_mat_t A, const fq_nmod_ctx_t ctx)
380380

381-
Puts `A` in reduced row echelon form and returns the rank of `A`.
381+
Puts `B` in reduced row echelon form and returns the rank of `A`.
382382

383383
The rref is computed by first obtaining an unreduced row echelon
384384
form via LU decomposition and then solving an additional

doc/source/fq_zech_mat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ Reduced row echelon form
343343
--------------------------------------------------------------------------------
344344

345345

346-
.. function:: slong fq_zech_mat_rref(fq_zech_mat_t A, const fq_zech_ctx_t ctx)
346+
.. function:: slong fq_zech_mat_rref(fq_zech_mat_t B, const fq_zech_mat_t A, const fq_zech_ctx_t ctx)
347347

348-
Puts `A` in reduced row echelon form and returns the rank of `A`.
348+
Puts `B` in reduced row echelon form and returns the rank of `A`.
349349

350350
The rref is computed by first obtaining an unreduced row echelon
351351
form via LU decomposition and then solving an additional

src/fmpz_mat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,6 @@ slong fmpz_mat_rref_mul(fmpz_mat_t B, fmpz_t den, const fmpz_mat_t A);
276276
int fmpz_mat_is_in_rref_with_rank(const fmpz_mat_t A, const fmpz_t den,
277277
slong rank);
278278

279-
/* Modular gaussian elimination *********************************************/
280-
281-
slong fmpz_mat_rref_mod(slong * perm, fmpz_mat_t A, const fmpz_t p);
282-
283279
/* Modular Howell and strong echelon form ***********************************/
284280

285281
slong fmpz_mat_howell_form_mod(fmpz_mat_t A, const fmpz_t mod);

src/fmpz_mat/rref_mod.c

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/fmpz_mat/test/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
#include "t-rank.c"
8787
#include "t-rref.c"
8888
#include "t-rref_fflu.c"
89-
#include "t-rref_mod.c"
9089
#include "t-rref_mul.c"
9190
#include "t-scalar_addmul_fmpz.c"
9291
#include "t-scalar_addmul_nmod_mat_fmpz.c"
@@ -186,7 +185,6 @@ test_struct tests[] =
186185
TEST_FUNCTION(fmpz_mat_rank),
187186
TEST_FUNCTION(fmpz_mat_rref),
188187
TEST_FUNCTION(fmpz_mat_rref_fflu),
189-
TEST_FUNCTION(fmpz_mat_rref_mod),
190188
TEST_FUNCTION(fmpz_mat_rref_mul),
191189
TEST_FUNCTION(fmpz_mat_scalar_addmul_fmpz),
192190
TEST_FUNCTION(fmpz_mat_scalar_addmul_nmod_mat_fmpz),

src/fmpz_mat/test/t-rref_mod.c

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)