aboutsummaryrefslogtreecommitdiff
path: root/src/symcoord.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/symcoord.c')
-rw-r--r--src/symcoord.c85
1 files changed, 57 insertions, 28 deletions
diff --git a/src/symcoord.c b/src/symcoord.c
index 038449a..707a84e 100644
--- a/src/symcoord.c
+++ b/src/symcoord.c
@@ -4,23 +4,24 @@
4#define CLASSES_CP_16 2768 4#define CLASSES_CP_16 2768
5#define CLASSES_EOFBEPOS_16 64430 5#define CLASSES_EOFBEPOS_16 64430
6 6
7static Cube antindex_coud_sym16(uint64_t ind);
8static Cube antindex_cp_sym16(uint64_t ind); 7static Cube antindex_cp_sym16(uint64_t ind);
9static Cube antindex_eofbepos_sym16(uint64_t ind); 8static Cube antindex_eofbepos_sym16(uint64_t ind);
10static Cube antindex_drud_sym16(uint64_t ind); 9static Cube antindex_drud_sym16(uint64_t ind);
11static Cube antindex_drudfin_noE_sym16(uint64_t ind); 10static Cube antindex_drudfin_noE_sym16(uint64_t ind);
12static Cube antindex_khuge(uint64_t ind); 11static Cube antindex_khuge(uint64_t ind);
12static Cube antindex_nxopt31(uint64_t ind);
13 13
14static uint64_t index_coud_sym16(Cube cube);
15static uint64_t index_cp_sym16(Cube cube); 14static uint64_t index_cp_sym16(Cube cube);
16static uint64_t index_eofbepos_sym16(Cube cube); 15static uint64_t index_eofbepos_sym16(Cube cube);
17static uint64_t index_drud_sym16(Cube cube); 16static uint64_t index_drud_sym16(Cube cube);
18static uint64_t index_drudfin_noE_sym16(Cube cube); 17static uint64_t index_drudfin_noE_sym16(Cube cube);
19static uint64_t index_khuge(Cube cube); 18static uint64_t index_khuge(Cube cube);
19static uint64_t index_nxopt31(Cube cube);
20 20
21static int transfinder_drud_sym16(uint64_t ind, Trans *ret); 21static int transfinder_drud_sym16(uint64_t ind, Trans *ret);
22static int transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret); 22static int transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret);
23static int transfinder_khuge(uint64_t ind, Trans *ret); 23static int transfinder_khuge(uint64_t ind, Trans *ret);
24static int transfinder_nxopt31(uint64_t ind, Trans *ret);
24 25
25static void gensym(SymData *sd); 26static void gensym(SymData *sd);
26static bool read_symdata_file(SymData *sd); 27static bool read_symdata_file(SymData *sd);
@@ -38,15 +39,6 @@ trans_group_udfix[16] = {
38}; 39};
39 40
40static SymData 41static SymData
41sd_coud_16 = {
42 .filename = "sd_coud_16",
43 .coord = &coord_coud,
44 .sym_coord = &coord_coud_sym16,
45 .ntrans = 16,
46 .trans = trans_group_udfix
47};
48
49static SymData
50sd_cp_16 = { 42sd_cp_16 = {
51 .filename = "sd_cp_16", 43 .filename = "sd_cp_16",
52 .coord = &coord_cp, 44 .coord = &coord_cp,
@@ -64,9 +56,8 @@ sd_eofbepos_16 = {
64 .trans = trans_group_udfix 56 .trans = trans_group_udfix
65}; 57};
66 58
67static int nsymdata = 3; 59static int nsymdata = 2;
68static SymData * all_sd[] = { 60static SymData * all_sd[] = {
69 &sd_coud_16,
70 &sd_cp_16, 61 &sd_cp_16,
71 &sd_eofbepos_16, 62 &sd_eofbepos_16,
72}; 63};
@@ -81,12 +72,6 @@ coord_eofbepos_sym16 = {
81}; 72};
82 73
83Coordinate 74Coordinate
84coord_coud_sym16 = {
85 .index = index_coud_sym16,
86 .cube = antindex_coud_sym16,
87};
88
89Coordinate
90coord_cp_sym16 = { 75coord_cp_sym16 = {
91 .index = index_cp_sym16, 76 .index = index_cp_sym16,
92 .cube = antindex_cp_sym16, 77 .cube = antindex_cp_sym16,
@@ -116,13 +101,15 @@ coord_khuge = {
116 .trans = transfinder_khuge, 101 .trans = transfinder_khuge,
117}; 102};
118 103
119/* Functions *****************************************************************/ 104Coordinate
105coord_nxopt31 = {
106 .index = index_nxopt31,
107 .cube = antindex_nxopt31,
108 .max = POW3TO7 * BINOM8ON4 * CLASSES_EOFBEPOS_16 ,
109 .trans = transfinder_nxopt31,
110};
120 111
121static Cube 112/* Functions *****************************************************************/
122antindex_coud_sym16(uint64_t ind)
123{
124 return sd_coud_16.rep[ind];
125}
126 113
127static Cube 114static Cube
128antindex_cp_sym16(uint64_t ind) 115antindex_cp_sym16(uint64_t ind)
@@ -173,10 +160,16 @@ antindex_khuge(uint64_t ind)
173 return c; 160 return c;
174} 161}
175 162
176static uint64_t 163static Cube
177index_coud_sym16(Cube cube) 164antindex_nxopt31(uint64_t ind)
178{ 165{
179 return sd_coud_16.class[coord_coud.index(cube)]; 166 Cube c;
167
168 c = antindex_eofbepos_sym16(ind/(BINOM8ON4*POW3TO7));
169 c.cp = coord_cpud_separate.cube((ind/POW3TO7)%BINOM8ON4).cp;
170 c.coud = ind % POW3TO7;
171
172 return c;
180} 173}
181 174
182static uint64_t 175static uint64_t
@@ -229,6 +222,20 @@ index_khuge(Cube cube)
229 return a * POW3TO7 + c.coud; 222 return a * POW3TO7 + c.coud;
230} 223}
231 224
225static uint64_t
226index_nxopt31(Cube cube)
227{
228 Trans t;
229 Cube c;
230 uint64_t a;
231
232 t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)];
233 c = apply_trans(t, cube);
234 a = (index_eofbepos_sym16(c)*BINOM8ON4) + coord_cpud_separate.index(c);
235
236 return a * POW3TO7 + c.coud;
237}
238
232static int 239static int
233transfinder_drud_sym16(uint64_t ind, Trans *ret) 240transfinder_drud_sym16(uint64_t ind, Trans *ret)
234{ 241{
@@ -295,6 +302,28 @@ transfinder_khuge(uint64_t ind, Trans *ret)
295 return naux[trueind]; 302 return naux[trueind];
296} 303}
297 304
305static int
306transfinder_nxopt31(uint64_t ind, Trans *ret)
307{
308 uint64_t i, trueind;
309 int j;
310 static bool initialized = false;
311 static int naux[CLASSES_EOFBEPOS_16];
312 static Trans retaux[CLASSES_EOFBEPOS_16][NTRANS];
313
314 if (!initialized) {
315 for (i = 0; i < CLASSES_EOFBEPOS_16; i++)
316 naux[i] = selfsims(&sd_eofbepos_16, i, retaux[i]);
317
318 initialized = true;
319 }
320
321 trueind = ind/(BINOM8ON4*POW3TO7);
322 for (j = 0; j < naux[trueind]; j++)
323 ret[j] = retaux[trueind][j];
324 return naux[trueind];
325}
326
298/* Other functions ***********************************************************/ 327/* Other functions ***********************************************************/
299 328
300static void 329static void

Generated with cgit - Back to sebastiano.tronto.net