M4RI  20200115
ple_russian.h
Go to the documentation of this file.
1 
10 #ifndef M4RI_PLE_RUSSIAN
11 #define M4RI_PLE_RUSSIAN
12 
13  /*******************************************************************
14  *
15  * M4RI: Linear Algebra over GF(2)
16  *
17  * Copyright (C) 2008-2011 Martin Albrecht <M.R.Albrecht@rhul.ac.uk>
18  *
19  * Distributed under the terms of the GNU General Public License (GPL)
20  * version 2 or higher.
21  *
22  * This code is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  * General Public License for more details.
26  *
27  * The full text of the GPL is available at:
28  *
29  * http://www.gnu.org/licenses/
30  *
31  ********************************************************************/
32 
33 #include <m4ri/mzd.h>
34 #include <m4ri/mzp.h>
35 
39 typedef struct {
40  mzd_t *T;
41  rci_t *M;
42  rci_t *E;
43  word *B;
44 } ple_table_t;
45 
53 ple_table_t *ple_table_init(int k, rci_t ncols);
54 
62 
63 
82 rci_t _mzd_ple_russian(mzd_t *A, mzp_t *P, mzp_t *Q, int k);
83 
99 rci_t _mzd_pluq_russian(mzd_t *A, mzp_t *P, mzp_t *Q, int k);
100 
124  rci_t const start_row, rci_t const stop_row,
125  rci_t const start_col, int const k,
126  mzp_t *P, mzp_t *Q, rci_t *pivots, rci_t *done, rci_t *done_row,
127  wi_t const splitblock);
128 
140 mzd_t *_mzd_ple_to_e(mzd_t *E, mzd_t const *A, rci_t r, rci_t c, int k, rci_t *offsets);
141 
153 void _mzd_process_rows_ple_2(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T);
154 
166 void _mzd_process_rows_ple_3(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T);
167 
179 void _mzd_process_rows_ple_4(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T);
180 
192 void _mzd_process_rows_ple_5(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T);
193 
205 void _mzd_process_rows_ple_6(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T);
206 
207 #endif // M4RI_PLE_RUSSIAN
_mzd_process_rows_ple_4
void _mzd_process_rows_ple_4(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T)
add rows T[0],T[1],T[2],T[3] to M between startrow and stoprow, starting at startcol.
_mzd_process_rows_ple_6
void _mzd_process_rows_ple_6(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T)
add rows T[0],T[1],T[2],T[3],T[4],T[5] to M between startrow and stoprow, starting at startcol.
_mzd_process_rows_ple_2
void _mzd_process_rows_ple_2(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T)
add rows T[0],T[1] to M between startrow and stoprow, starting at startcol.
mzp.h
Permutation matrices.
_mzd_ple_russian
rci_t _mzd_ple_russian(mzd_t *A, mzp_t *P, mzp_t *Q, int k)
PLE matrix decomposition of A using Gray codes.
Definition: ple_russian.c:378
_mzd_process_rows_ple_5
void _mzd_process_rows_ple_5(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T)
add rows T[0],T[1],T[2],T[3],T[4] to M between startrow and stoprow, starting at startcol.
ple_table_free
void ple_table_free(ple_table_t *T)
Delete table T.
Definition: ple_russian.c:49
mzd.h
Dense matrices over GF(2) represented as a bit field.
_mzd_ple_submatrix
int _mzd_ple_submatrix(mzd_t *A, rci_t const start_row, rci_t const stop_row, rci_t const start_col, int const k, mzp_t *P, mzp_t *Q, rci_t *pivots, rci_t *done, rci_t *done_row, wi_t const splitblock)
PLE matrix decomposition of a submatrix for up to k columns starting at (r,c).
Definition: ple_russian.c:99
rci_t
int rci_t
Type of row and column indexes.
Definition: misc.h:72
mzd_t
Dense matrices over GF(2).
Definition: mzd.h:86
ple_table_init
ple_table_t * ple_table_init(int k, rci_t ncols)
Definition: ple_russian.c:40
ple_table_t
PLE Elimination Tables.
Definition: ple_russian.h:39
_mzd_ple_to_e
mzd_t * _mzd_ple_to_e(mzd_t *E, mzd_t const *A, rci_t r, rci_t c, int k, rci_t *offsets)
Extract the k x A::ncols echelon form submatrix of A starting at row r and column c.
Definition: ple_russian.c:362
word
uint64_t word
A word is the typical packed data structure to represent packed bits.
Definition: misc.h:87
_mzd_pluq_russian
rci_t _mzd_pluq_russian(mzd_t *A, mzp_t *P, mzp_t *Q, int k)
PLUQ matrix decomposition of A using Gray codes.
Definition: ple_russian.c:614
wi_t
int wi_t
Type of word indexes.
Definition: misc.h:80
_mzd_process_rows_ple_3
void _mzd_process_rows_ple_3(mzd_t *M, rci_t startrow, rci_t stoprow, rci_t startcol, int const *k, const ple_table_t **T)
add rows T[0],T[1],T[2] to M between startrow and stoprow, starting at startcol.
mzp_t
Permutations.
Definition: mzp.h:37