diff options
Diffstat (limited to 'src/symcoord.c')
| -rw-r--r-- | src/symcoord.c | 82 |
1 files changed, 7 insertions, 75 deletions
diff --git a/src/symcoord.c b/src/symcoord.c index cb105a9..b2099a7 100644 --- a/src/symcoord.c +++ b/src/symcoord.c | |||
| @@ -8,19 +8,16 @@ static Cube antindex_cp_sym16(uint64_t ind); | |||
| 8 | static Cube antindex_eofbepos_sym16(uint64_t ind); | 8 | static Cube antindex_eofbepos_sym16(uint64_t ind); |
| 9 | static Cube antindex_drud_sym16(uint64_t ind); | 9 | static Cube antindex_drud_sym16(uint64_t ind); |
| 10 | static Cube antindex_drudfin_noE_sym16(uint64_t ind); | 10 | static Cube antindex_drudfin_noE_sym16(uint64_t ind); |
| 11 | /*static Cube antindex_khuge(uint64_t ind);*/ | ||
| 12 | static Cube antindex_nxopt31(uint64_t ind); | 11 | static Cube antindex_nxopt31(uint64_t ind); |
| 13 | 12 | ||
| 14 | static uint64_t index_cp_sym16(Cube cube); | 13 | static uint64_t index_cp_sym16(Cube cube); |
| 15 | static uint64_t index_eofbepos_sym16(Cube cube); | 14 | static uint64_t index_eofbepos_sym16(Cube cube); |
| 16 | static uint64_t index_drud_sym16(Cube cube); | 15 | static uint64_t index_drud_sym16(Cube cube); |
| 17 | static uint64_t index_drudfin_noE_sym16(Cube cube); | 16 | static uint64_t index_drudfin_noE_sym16(Cube cube); |
| 18 | /*static uint64_t index_khuge(Cube cube);*/ | ||
| 19 | static uint64_t index_nxopt31(Cube cube); | 17 | static uint64_t index_nxopt31(Cube cube); |
| 20 | 18 | ||
| 21 | static int transfinder_drud_sym16(uint64_t ind, Trans *ret); | 19 | static int transfinder_drud_sym16(uint64_t ind, Trans *ret); |
| 22 | static int transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret); | 20 | static int transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret); |
| 23 | /*static int transfinder_khuge(uint64_t ind, Trans *ret);*/ | ||
| 24 | static int transfinder_nxopt31(uint64_t ind, Trans *ret); | 21 | static int transfinder_nxopt31(uint64_t ind, Trans *ret); |
| 25 | 22 | ||
| 26 | static void gensym(SymData *sd); | 23 | static void gensym(SymData *sd); |
| @@ -93,16 +90,6 @@ coord_drudfin_noE_sym16 = { | |||
| 93 | .trans = transfinder_drudfin_noE_sym16, | 90 | .trans = transfinder_drudfin_noE_sym16, |
| 94 | }; | 91 | }; |
| 95 | 92 | ||
| 96 | /* | ||
| 97 | Coordinate | ||
| 98 | coord_khuge = { | ||
| 99 | .index = index_khuge, | ||
| 100 | .cube = antindex_khuge, | ||
| 101 | .max = POW3TO7 * FACTORIAL4 * CLASSES_EOFBEPOS_16, | ||
| 102 | .trans = transfinder_khuge, | ||
| 103 | }; | ||
| 104 | */ | ||
| 105 | |||
| 106 | Coordinate | 93 | Coordinate |
| 107 | coord_nxopt31 = { | 94 | coord_nxopt31 = { |
| 108 | .index = index_nxopt31, | 95 | .index = index_nxopt31, |
| @@ -150,20 +137,6 @@ antindex_drudfin_noE_sym16(uint64_t ind) | |||
| 150 | return c1; | 137 | return c1; |
| 151 | } | 138 | } |
| 152 | 139 | ||
| 153 | /* | ||
| 154 | static Cube | ||
| 155 | antindex_khuge(uint64_t ind) | ||
| 156 | { | ||
| 157 | Cube c; | ||
| 158 | |||
| 159 | c = antindex_eofbepos_sym16(ind/(FACTORIAL4*POW3TO7)); | ||
| 160 | c.epose = ((c.epose / 24) * 24) + ((ind/POW3TO7) % 24); | ||
| 161 | c.coud = ind % POW3TO7; | ||
| 162 | |||
| 163 | return c; | ||
| 164 | } | ||
| 165 | */ | ||
| 166 | |||
| 167 | static Cube | 140 | static Cube |
| 168 | antindex_nxopt31(uint64_t ind) | 141 | antindex_nxopt31(uint64_t ind) |
| 169 | { | 142 | { |
| @@ -186,12 +159,10 @@ static uint64_t | |||
| 186 | index_drud_sym16(Cube cube) | 159 | index_drud_sym16(Cube cube) |
| 187 | { | 160 | { |
| 188 | Trans t; | 161 | Trans t; |
| 189 | Cube c; | ||
| 190 | 162 | ||
| 191 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; | 163 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; |
| 192 | c = apply_trans(t, cube); | ||
| 193 | 164 | ||
| 194 | return index_eofbepos_sym16(c) * POW3TO7 + c.coud; | 165 | return index_eofbepos_sym16(cube) * POW3TO7 + co_ttable[t][cube.coud]; |
| 195 | } | 166 | } |
| 196 | 167 | ||
| 197 | static uint64_t | 168 | static uint64_t |
| @@ -212,34 +183,19 @@ index_eofbepos_sym16(Cube cube) | |||
| 212 | return sd_eofbepos_16.class[coord_eofbepos.index(cube)]; | 183 | return sd_eofbepos_16.class[coord_eofbepos.index(cube)]; |
| 213 | } | 184 | } |
| 214 | 185 | ||
| 215 | /* | ||
| 216 | static uint64_t | ||
| 217 | index_khuge(Cube cube) | ||
| 218 | { | ||
| 219 | Trans t; | ||
| 220 | Cube c; | ||
| 221 | uint64_t a; | ||
| 222 | |||
| 223 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; | ||
| 224 | c = apply_trans(t, cube); | ||
| 225 | a = (index_eofbepos_sym16(c) * 24) + (c.epose % 24); | ||
| 226 | |||
| 227 | return a * POW3TO7 + c.coud; | ||
| 228 | } | ||
| 229 | */ | ||
| 230 | |||
| 231 | static uint64_t | 186 | static uint64_t |
| 232 | index_nxopt31(Cube cube) | 187 | index_nxopt31(Cube cube) |
| 233 | { | 188 | { |
| 234 | Trans t; | 189 | Trans t; |
| 235 | Cube c; | ||
| 236 | uint64_t a; | 190 | uint64_t a; |
| 237 | 191 | int coud, cp; | |
| 192 | |||
| 238 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; | 193 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; |
| 239 | c = apply_trans(t, cube); | 194 | coud = co_ttable[t][cube.coud]; |
| 240 | a = (index_eofbepos_sym16(c)*POW3TO7) + c.coud; | 195 | cp = cp_ttable[t][cube.cp]; |
| 196 | a = (index_eofbepos_sym16(cube)*POW3TO7) + coud; | ||
| 241 | 197 | ||
| 242 | return a * BINOM8ON4 + coord_cpud_separate.index(c); | 198 | return a * BINOM8ON4 + coord_cpud_separate.index((Cube){.cp = cp}); |
| 243 | } | 199 | } |
| 244 | 200 | ||
| 245 | static int | 201 | static int |
| @@ -286,30 +242,6 @@ transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret) | |||
| 286 | return naux[trueind]; | 242 | return naux[trueind]; |
| 287 | } | 243 | } |
| 288 | 244 | ||
| 289 | /* | ||
| 290 | static int | ||
| 291 | transfinder_khuge(uint64_t ind, Trans *ret) | ||
| 292 | { | ||
| 293 | uint64_t i, trueind; | ||
| 294 | int j; | ||
| 295 | static bool initialized = false; | ||
| 296 | static int naux[CLASSES_EOFBEPOS_16]; | ||
| 297 | static Trans retaux[CLASSES_EOFBEPOS_16][NTRANS]; | ||
| 298 | |||
| 299 | if (!initialized) { | ||
| 300 | for (i = 0; i < CLASSES_EOFBEPOS_16; i++) | ||
| 301 | naux[i] = selfsims(&sd_eofbepos_16, i, retaux[i]); | ||
| 302 | |||
| 303 | initialized = true; | ||
| 304 | } | ||
| 305 | |||
| 306 | trueind = ind/(FACTORIAL4*POW3TO7); | ||
| 307 | for (j = 0; j < naux[trueind]; j++) | ||
| 308 | ret[j] = retaux[trueind][j]; | ||
| 309 | return naux[trueind]; | ||
| 310 | } | ||
| 311 | */ | ||
| 312 | |||
| 313 | static int | 245 | static int |
| 314 | transfinder_nxopt31(uint64_t ind, Trans *ret) | 246 | transfinder_nxopt31(uint64_t ind, Trans *ret) |
| 315 | { | 247 | { |
