diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/solve_h48.h | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/solve_h48.h b/src/solve_h48.h index 5054605..ed63209 100644 --- a/src/solve_h48.h +++ b/src/solve_h48.h | |||
| @@ -422,16 +422,10 @@ gendata_h48h0k4_return_size: | |||
| 422 | _static int64_t | 422 | _static int64_t |
| 423 | gendata_h48h0k4_bfs(bfsarg_esep_t *arg) | 423 | gendata_h48h0k4_bfs(bfsarg_esep_t *arg) |
| 424 | { | 424 | { |
| 425 | /* | ||
| 426 | TODO: the new method gives a slightly different answer. If the new | ||
| 427 | method is correct, then the old bfs method is wrong. Which one is it? | ||
| 428 | Try also DFS and compare results (it could be faster). | ||
| 429 | */ | ||
| 430 | if (2 * arg->done < (int64_t)ESEP_MAX(0)) | 425 | if (2 * arg->done < (int64_t)ESEP_MAX(0)) |
| 431 | return gendata_h48h0k4_bfs_fromdone(arg); | 426 | return gendata_h48h0k4_bfs_fromdone(arg); |
| 432 | else | 427 | else |
| 433 | return gendata_h48h0k4_bfs_fromnew(arg); | 428 | return gendata_h48h0k4_bfs_fromnew(arg); |
| 434 | // return gendata_h48h0k4_bfs_fromnew(arg); | ||
| 435 | } | 429 | } |
| 436 | 430 | ||
| 437 | _static int64_t | 431 | _static int64_t |
| @@ -464,22 +458,7 @@ gendata_h48h0k4_bfs_fromdone(bfsarg_esep_t *arg) | |||
| 464 | cocsep_coord = j / H48_ESIZE(0); | 458 | cocsep_coord = j / H48_ESIZE(0); |
| 465 | sim = arg->selfsim[cocsep_coord] >> UINT64_C(1); | 459 | sim = arg->selfsim[cocsep_coord] >> UINT64_C(1); |
| 466 | for (t = 1; t < 48 && sim; t++, sim >>= UINT64_C(1)) { | 460 | for (t = 1; t < 48 && sim; t++, sim >>= UINT64_C(1)) { |
| 467 | if (!(sim & UINT64_C(1))) { | 461 | /* TODO: use only selfsim */ |
| 468 | transd = transform(moved, t); | ||
| 469 | k = coord_h48(transd, arg->cocsepdata, 0); | ||
| 470 | if (k != j) { | ||
| 471 | /* | ||
| 472 | LOG("t=%" PRId64 ", tinv=%" PRIu8 "\n", t, inverse_trans(t)); | ||
| 473 | int64_t ccm = coord_cocsep(moved); | ||
| 474 | int64_t repm = coord_cocsep(arg->crep[j/H48_ESIZE(0)]); | ||
| 475 | LOG("moved: full %" PRId64 ", cocsep %" PRId64 ", rep %" PRId64 ", ttrep %" PRId32 "\n", j, ccm, repm, TTREP(arg->cocsepdata[ccm])); | ||
| 476 | int64_t cct = coord_cocsep(transd); | ||
| 477 | int64_t rept = coord_cocsep(arg->crep[k/H48_ESIZE(0)]); | ||
| 478 | LOG("moved: full %" PRId64 ", cocsep %" PRId64 ", rep %" PRId64 ", ttrep %" PRId32 "\n", j, cct, rept, TTREP(arg->cocsepdata[cct])); | ||
| 479 | */ | ||
| 480 | } | ||
| 481 | continue; | ||
| 482 | } | ||
| 483 | transd = transform(moved, t); | 462 | transd = transform(moved, t); |
| 484 | k = coord_h48(transd, arg->cocsepdata, 0); | 463 | k = coord_h48(transd, arg->cocsepdata, 0); |
| 485 | x = get_esep_pval(arg->buf32, k); | 464 | x = get_esep_pval(arg->buf32, k); |
| @@ -512,10 +491,7 @@ gendata_h48h0k4_bfs_fromnew(bfsarg_esep_t *arg) | |||
| 512 | j = coord_h48(moved, arg->cocsepdata, 0); | 491 | j = coord_h48(moved, arg->cocsepdata, 0); |
| 513 | x = get_esep_pval(arg->buf32, j); | 492 | x = get_esep_pval(arg->buf32, j); |
| 514 | if (x < arg->depth) | 493 | if (x < arg->depth) |
| 515 | { | ||
| 516 | if (x < arg->depth -1) LOG("WAT %" PRIu8 " while scanning %" PRIu8 "\n",x, arg->depth); | ||
| 517 | goto neighbor_found; | 494 | goto neighbor_found; |
| 518 | } | ||
| 519 | } | 495 | } |
| 520 | continue; | 496 | continue; |
| 521 | neighbor_found: | 497 | neighbor_found: |
| @@ -524,8 +500,7 @@ neighbor_found: | |||
| 524 | cocsep_coord = i / H48_ESIZE(0); | 500 | cocsep_coord = i / H48_ESIZE(0); |
| 525 | sim = arg->selfsim[cocsep_coord] >> 1; | 501 | sim = arg->selfsim[cocsep_coord] >> 1; |
| 526 | for (t = 1; t < 48 && sim; t++, sim >>= 1) { | 502 | for (t = 1; t < 48 && sim; t++, sim >>= 1) { |
| 527 | if (!(sim & 1)) | 503 | /* TODO: use only selfsim */ |
| 528 | continue; | ||
| 529 | transd = transform(cube, t); | 504 | transd = transform(cube, t); |
| 530 | j = coord_h48(transd, arg->cocsepdata, 0); | 505 | j = coord_h48(transd, arg->cocsepdata, 0); |
| 531 | x = get_esep_pval(arg->buf32, j); | 506 | x = get_esep_pval(arg->buf32, j); |
