M4RI
1.0.1
|
00001 00012 #ifndef M4RI_GRAYFLEX_H 00013 #define M4RI_GRAYFLEX_H 00014 00015 /****************************************************************************** 00016 * 00017 * M4RI: Linear Algebra over GF(2) 00018 * 00019 * Copyright (C) 2007 Gregory Bard <gregory.bard@ieee.org> 00020 * Copyright (C) 2007 Martin Albrecht <malb@informatik.uni-bremen.de> 00021 * 00022 * Distributed under the terms of the GNU General Public License (GPL) 00023 * version 2 or higher. 00024 * 00025 * This code is distributed in the hope that it will be useful, 00026 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00027 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00028 * General Public License for more details. 00029 * 00030 * The full text of the GPL is available at: 00031 * 00032 * http://www.gnu.org/licenses/ 00033 ******************************************************************************/ 00034 00039 #define __M4RI_MAXKAY 16 00040 00065 typedef struct { 00069 int *ord; 00073 int *inc; 00074 } code; 00075 00082 extern code **m4ri_codebook; 00083 00093 int m4ri_gray_code(int i, int l); 00094 00107 void m4ri_build_code(int *ord, int *inc, int l); 00108 00118 void m4ri_build_all_codes(void); 00119 00129 void m4ri_destroy_all_codes(void); 00130 00146 int m4ri_opt_k(int a,int b,int c); 00147 00148 #endif // M4RI_GRAYFLEX_H