diff options
Diffstat (limited to 'src/solvers/h48/solve.h')
| -rw-r--r-- | src/solvers/h48/solve.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index 8531a40..0843792 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h | |||
| @@ -7,6 +7,7 @@ typedef struct { | |||
| 7 | int64_t *nsols; | 7 | int64_t *nsols; |
| 8 | int64_t maxsolutions; | 8 | int64_t maxsolutions; |
| 9 | uint8_t h; | 9 | uint8_t h; |
| 10 | uint8_t k; | ||
| 10 | uint32_t *cocsepdata; | 11 | uint32_t *cocsepdata; |
| 11 | uint32_t *h48data; | 12 | uint32_t *h48data; |
| 12 | char **nextsol; | 13 | char **nextsol; |
| @@ -26,7 +27,7 @@ _static void solve_h48_appendsolution(dfsarg_solveh48_t *); | |||
| 26 | _static_inline bool solve_h48_stop(dfsarg_solveh48_t *); | 27 | _static_inline bool solve_h48_stop(dfsarg_solveh48_t *); |
| 27 | _static int64_t solve_h48_dfs(dfsarg_solveh48_t *); | 28 | _static int64_t solve_h48_dfs(dfsarg_solveh48_t *); |
| 28 | _static int64_t solve_h48( | 29 | _static int64_t solve_h48( |
| 29 | cube_t, int8_t, int8_t, int8_t, uint8_t, const void *, char *); | 30 | cube_t, int8_t, int8_t, int8_t, uint8_t, uint8_t, const void *, char *); |
| 30 | 31 | ||
| 31 | _static int64_t solve_h48stats_dfs(dfsarg_solveh48stats_t *); | 32 | _static int64_t solve_h48stats_dfs(dfsarg_solveh48stats_t *); |
| 32 | _static int64_t solve_h48stats(cube_t, int8_t, const void *, char [static 12]); | 33 | _static int64_t solve_h48stats(cube_t, int8_t, const void *, char [static 12]); |
| @@ -59,12 +60,12 @@ solve_h48_stop(dfsarg_solveh48_t *arg) | |||
| 59 | return true; | 60 | return true; |
| 60 | 61 | ||
| 61 | /* | 62 | /* |
| 62 | bound = get_h48_bound(arg->cube, data, arg->h, arg->h48data); | 63 | bound = get_h48_bound(arg->cube, data, arg->h, arg->k, arg->h48data); |
| 63 | LOG("Using pval %" PRId8 "\n", bound); | 64 | LOG("Using pval %" PRId8 "\n", bound); |
| 64 | if (bound + arg->nmoves > arg->depth) | 65 | if (bound + arg->nmoves > arg->depth) |
| 65 | return true; | 66 | return true; |
| 66 | 67 | ||
| 67 | bound = get_h48_bound(arg->inverse, data_inv, arg->h, arg->h48data); | 68 | bound = get_h48_bound(arg->inverse, data_inv, arg->h, arg->k, arg->h48data); |
| 68 | if (bound + arg->nmoves > arg->depth) | 69 | if (bound + arg->nmoves > arg->depth) |
| 69 | return true; | 70 | return true; |
| 70 | */ | 71 | */ |
| @@ -119,6 +120,7 @@ solve_h48( | |||
| 119 | int8_t maxmoves, | 120 | int8_t maxmoves, |
| 120 | int8_t maxsolutions, | 121 | int8_t maxsolutions, |
| 121 | uint8_t h, | 122 | uint8_t h, |
| 123 | uint8_t k, | ||
| 122 | const void *data, | 124 | const void *data, |
| 123 | char *solutions | 125 | char *solutions |
| 124 | ) | 126 | ) |
| @@ -132,6 +134,7 @@ solve_h48( | |||
| 132 | .nsols = &nsols, | 134 | .nsols = &nsols, |
| 133 | .maxsolutions = maxsolutions, | 135 | .maxsolutions = maxsolutions, |
| 134 | .h = h, | 136 | .h = h, |
| 137 | .k = k, | ||
| 135 | .cocsepdata = (uint32_t *)data, | 138 | .cocsepdata = (uint32_t *)data, |
| 136 | .h48data = ((uint32_t *)data) + COCSEP_FULLSIZE / 4, | 139 | .h48data = ((uint32_t *)data) + COCSEP_FULLSIZE / 4, |
| 137 | .nextsol = &solutions | 140 | .nextsol = &solutions |
| @@ -175,7 +178,7 @@ solve_h48stats_dfs(dfsarg_solveh48stats_t *arg) | |||
| 175 | 178 | ||
| 176 | /* Check h48 lower bound for h=0 (esep, but no eo) */ | 179 | /* Check h48 lower bound for h=0 (esep, but no eo) */ |
| 177 | coord = coord_h48_edges(arg->cube, COCLASS(d), TTREP(d), 0); | 180 | coord = coord_h48_edges(arg->cube, COCLASS(d), TTREP(d), 0); |
| 178 | bound = get_esep_pval(arg->h48data, coord); | 181 | bound = get_esep_pval(arg->h48data, coord, 4); |
| 179 | if (bound + arg->nmoves > arg->depth) | 182 | if (bound + arg->nmoves > arg->depth) |
| 180 | return 0; | 183 | return 0; |
| 181 | 184 | ||
