M4RI  1.0.1
graycode.h
1 
12 #ifndef M4RI_GRAYFLEX_H
13 #define M4RI_GRAYFLEX_H
14 
15 /******************************************************************************
16 *
17 * M4RI: Linear Algebra over GF(2)
18 *
19 * Copyright (C) 2007 Gregory Bard <gregory.bard@ieee.org>
20 * Copyright (C) 2007 Martin Albrecht <malb@informatik.uni-bremen.de>
21 *
22 * Distributed under the terms of the GNU General Public License (GPL)
23 * version 2 or higher.
24 *
25 * This code is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * General Public License for more details.
29 *
30 * The full text of the GPL is available at:
31 *
32 * http://www.gnu.org/licenses/
33 ******************************************************************************/
34 
39 #define __M4RI_MAXKAY 16
40 
65 typedef struct {
69  int *ord;
73  int *inc;
74 } code;
75 
82 extern code **m4ri_codebook;
83 
93 int m4ri_gray_code(int i, int l);
94 
107 void m4ri_build_code(int *ord, int *inc, int l);
108 
118 void m4ri_build_all_codes(void);
119 
129 void m4ri_destroy_all_codes(void);
130 
146 int m4ri_opt_k(int a,int b,int c);
147 
148 #endif // M4RI_GRAYFLEX_H