M4RI
1.0.1
|
00001 00013 #ifndef M4RI_BRILLIANTRUSSIAN_H 00014 #define M4RI_BRILLIANTRUSSIAN_H 00015 00016 /******************************************************************* 00017 * 00018 * M4RI: Linear Algebra over GF(2) 00019 * 00020 * Copyright (C) 2007, 2008 Gregory Bard <bard@fordham.edu> 00021 * Copyright (C) 2008-2010 Martin Albrecht <martinralbrecht@googlemail.com> 00022 * 00023 * Distributed under the terms of the GNU General Public License (GPL) 00024 * version 2 or higher. 00025 * 00026 * This code is distributed in the hope that it will be useful, 00027 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00028 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00029 * General Public License for more details. 00030 * 00031 * The full text of the GPL is available at: 00032 * 00033 * http://www.gnu.org/licenses/ 00034 * 00035 ********************************************************************/ 00036 00037 #include <math.h> 00038 #include <string.h> 00039 #include <stdlib.h> 00040 00041 #include "packedmatrix.h" 00042 #include "permutation.h" 00043 00058 void mzd_make_table(mzd_t const *M, rci_t r, rci_t c, int k, mzd_t *T, rci_t *L); 00059 00078 void mzd_process_rows(mzd_t *M, rci_t startrow, rci_t endrow, rci_t startcol, int k, mzd_t const *T, rci_t const *L); 00079 00097 void mzd_process_rows2(mzd_t *M, rci_t startrow, rci_t endrow, rci_t startcol, int k, mzd_t const *T0, rci_t const *L0, mzd_t const *T1, rci_t const *L1); 00098 00118 void mzd_process_rows3(mzd_t *M, rci_t startrow, rci_t endrow, rci_t startcol, int k, 00119 mzd_t const *T0, rci_t const *L0, mzd_t const *T1, rci_t const *L1, 00120 mzd_t const *T2, rci_t const *L2); 00121 00143 void mzd_process_rows4(mzd_t *M, rci_t startrow, rci_t endrow, rci_t startcol, int k, 00144 mzd_t const *T0, rci_t const *L0, mzd_t const *T1, rci_t const *L1, 00145 mzd_t const *T2, rci_t const *L2, mzd_t const *T3, rci_t const *L3); 00146 00170 void mzd_process_rows5(mzd_t *M, rci_t startrow, rci_t endrow, rci_t startcol, int k, 00171 mzd_t const *T0, rci_t const *L0, mzd_t const *T1, rci_t const *L1, 00172 mzd_t const *T2, rci_t const *L2, mzd_t const *T3, rci_t const *L3, 00173 mzd_t const *T4, rci_t const *L4); 00174 00200 void mzd_process_rows6(mzd_t *M, rci_t startrow, rci_t endrow, rci_t startcol, int k, 00201 mzd_t const *T0, rci_t const *L0, mzd_t const *T1, rci_t const *L1, 00202 mzd_t const *T2, rci_t const *L2, mzd_t const *T3, rci_t const *L3, 00203 mzd_t const *T4, rci_t const *L4, mzd_t const *T5, rci_t const *L5); 00204 00229 rci_t _mzd_echelonize_m4ri(mzd_t *A, const int full, int k, int heuristic, const double threshold); 00230 00242 void mzd_top_echelonize_m4ri(mzd_t *M, int k); 00243 00259 rci_t _mzd_top_echelonize_m4ri(mzd_t *A, int k, rci_t r, rci_t c, rci_t max_r); 00260 00279 mzd_t *mzd_invert_m4ri(mzd_t const *M, mzd_t const *I, int k); 00280 00298 mzd_t *mzd_mul_m4rm(mzd_t *C, mzd_t const *A, mzd_t const *B, int k); 00299 00300 00317 mzd_t *mzd_addmul_m4rm(mzd_t *C, mzd_t const *A, mzd_t const *B, int k); 00318 00344 mzd_t *_mzd_mul_m4rm(mzd_t *C, mzd_t const *A, mzd_t const *B, int k, int clear); 00345 00350 #define __M4RI_M4RM_GRAY8 00351 00352 void _mzd_trsm_upper_left_even_m4r(mzd_t const *U, mzd_t *B, int k); 00353 00354 #endif // M4RI_BRILLIANTRUSSIAN_H