diff options
Diffstat (limited to 'src/solve_h48.h')
| -rw-r--r-- | src/solve_h48.h | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/solve_h48.h b/src/solve_h48.h index c3316e1..5054605 100644 --- a/src/solve_h48.h +++ b/src/solve_h48.h | |||
| @@ -307,9 +307,9 @@ gendata_cocsep_return_size: | |||
| 307 | _static uint32_t | 307 | _static uint32_t |
| 308 | gendata_cocsep_dfs(dfsarg_cocsep_t *arg) | 308 | gendata_cocsep_dfs(dfsarg_cocsep_t *arg) |
| 309 | { | 309 | { |
| 310 | uint8_t m, tinv; | 310 | uint8_t m; |
| 311 | uint32_t cc, class, ttrep, depth, olddepth; | 311 | uint32_t cc, class, ttrep, depth, olddepth, tinv; |
| 312 | uint64_t t, is; | 312 | uint64_t t; |
| 313 | int64_t i, j; | 313 | int64_t i, j; |
| 314 | cube_t d; | 314 | cube_t d; |
| 315 | dfsarg_cocsep_t nextarg; | 315 | dfsarg_cocsep_t nextarg; |
| @@ -324,24 +324,25 @@ gendata_cocsep_dfs(dfsarg_cocsep_t *arg) | |||
| 324 | if ((arg->buf32[i] & 0xFF) != 0xFF) | 324 | if ((arg->buf32[i] & 0xFF) != 0xFF) |
| 325 | return 0; | 325 | return 0; |
| 326 | 326 | ||
| 327 | if (arg->rep != NULL) | ||
| 328 | arg->rep[*arg->n] = arg->cube; | ||
| 327 | for (t = 0, cc = 0; t < 48; t++) { | 329 | for (t = 0, cc = 0; t < 48; t++) { |
| 328 | d = transform_corners(arg->cube, t); | 330 | d = transform_corners(arg->cube, t); |
| 329 | j = coord_cocsep(d); | 331 | j = coord_cocsep(d); |
| 330 | is = (i == j); | 332 | if (i == j && arg->selfsim != NULL) |
| 331 | if (arg->selfsim != NULL) | 333 | arg->selfsim[*arg->n] |= UINT64_C(1) << t; |
| 332 | arg->selfsim[*arg->n] |= is << t; | 334 | if (COCLASS(arg->buf32[j]) != UINT32_C(0xFFFF)) |
| 335 | continue; | ||
| 333 | set_visited(arg->visited, j); | 336 | set_visited(arg->visited, j); |
| 334 | tinv = inverse_trans(t) * (1-is); | 337 | tinv = inverse_trans(t); |
| 335 | olddepth = (uint8_t)(arg->buf32[j] & 0xFF); | 338 | olddepth = arg->buf32[j] & 0xFF; |
| 336 | cc += olddepth == 0xFF; | 339 | cc += olddepth == 0xFF; |
| 337 | 340 | ||
| 338 | class = (uint32_t)(*arg->n) << 16; | 341 | class = (uint32_t)(*arg->n) << UINT32_C(16); |
| 339 | ttrep = (uint32_t)tinv << 8; | 342 | ttrep = (uint32_t)tinv << UINT32_C(8); |
| 340 | depth = (uint32_t)arg->depth; | 343 | depth = (uint32_t)arg->depth; |
| 341 | arg->buf32[j] = class | ttrep | depth; | 344 | arg->buf32[j] = class | ttrep | depth; |
| 342 | } | 345 | } |
| 343 | if (arg->rep != NULL) | ||
| 344 | arg->rep[*arg->n] = arg->cube; | ||
| 345 | (*arg->n)++; | 346 | (*arg->n)++; |
| 346 | 347 | ||
| 347 | return cc; | 348 | return cc; |
| @@ -467,6 +468,7 @@ gendata_h48h0k4_bfs_fromdone(bfsarg_esep_t *arg) | |||
| 467 | transd = transform(moved, t); | 468 | transd = transform(moved, t); |
| 468 | k = coord_h48(transd, arg->cocsepdata, 0); | 469 | k = coord_h48(transd, arg->cocsepdata, 0); |
| 469 | if (k != j) { | 470 | if (k != j) { |
| 471 | /* | ||
| 470 | LOG("t=%" PRId64 ", tinv=%" PRIu8 "\n", t, inverse_trans(t)); | 472 | LOG("t=%" PRId64 ", tinv=%" PRIu8 "\n", t, inverse_trans(t)); |
| 471 | int64_t ccm = coord_cocsep(moved); | 473 | int64_t ccm = coord_cocsep(moved); |
| 472 | int64_t repm = coord_cocsep(arg->crep[j/H48_ESIZE(0)]); | 474 | int64_t repm = coord_cocsep(arg->crep[j/H48_ESIZE(0)]); |
| @@ -474,12 +476,6 @@ LOG("moved: full %" PRId64 ", cocsep %" PRId64 ", rep %" PRId64 ", ttrep %" PRId | |||
| 474 | int64_t cct = coord_cocsep(transd); | 476 | int64_t cct = coord_cocsep(transd); |
| 475 | int64_t rept = coord_cocsep(arg->crep[k/H48_ESIZE(0)]); | 477 | int64_t rept = coord_cocsep(arg->crep[k/H48_ESIZE(0)]); |
| 476 | LOG("moved: full %" PRId64 ", cocsep %" PRId64 ", rep %" PRId64 ", ttrep %" PRId32 "\n", j, cct, rept, TTREP(arg->cocsepdata[cct])); | 478 | LOG("moved: full %" PRId64 ", cocsep %" PRId64 ", rep %" PRId64 ", ttrep %" PRId32 "\n", j, cct, rept, TTREP(arg->cocsepdata[cct])); |
| 477 | /* | ||
| 478 | char q[150]; | ||
| 479 | writecube_H48(moved, q); | ||
| 480 | LOG("%s\n", q) | ||
| 481 | writecube_H48(transd, q); | ||
| 482 | LOG("%s\n", q) | ||
| 483 | */ | 479 | */ |
| 484 | } | 480 | } |
| 485 | continue; | 481 | continue; |
