diff options
Diffstat (limited to 'src/solve_generic.h')
| -rw-r--r-- | src/solve_generic.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/solve_generic.h b/src/solve_generic.h index 6cdcc33..b5d1e2d 100644 --- a/src/solve_generic.h +++ b/src/solve_generic.h | |||
| @@ -1,19 +1,19 @@ | |||
| 1 | typedef struct { | 1 | typedef struct { |
| 2 | cube_fast_t cube; | 2 | cube_t cube; |
| 3 | uint8_t depth; | 3 | uint8_t depth; |
| 4 | int64_t maxsols; | 4 | int64_t maxsols; |
| 5 | char **nextsol; | 5 | char **nextsol; |
| 6 | int64_t *nsols; | 6 | int64_t *nsols; |
| 7 | uint8_t nmoves; | 7 | uint8_t nmoves; |
| 8 | uint8_t moves[20]; | 8 | uint8_t moves[20]; |
| 9 | uint8_t (*estimate)(cube_fast_t); | 9 | uint8_t (*estimate)(cube_t); |
| 10 | } dfsarg_generic_t; | 10 | } dfsarg_generic_t; |
| 11 | 11 | ||
| 12 | _static void solve_generic_appendsolution(dfsarg_generic_t *); | 12 | _static void solve_generic_appendsolution(dfsarg_generic_t *); |
| 13 | _static int solve_generic_dfs(dfsarg_generic_t *); | 13 | _static int solve_generic_dfs(dfsarg_generic_t *); |
| 14 | _static int64_t solve_generic(cube_t, const char *, int8_t, int8_t, int64_t, | 14 | _static int64_t solve_generic(cube_t, const char *, int8_t, int8_t, int64_t, |
| 15 | int8_t, char *, uint8_t (*)(cube_fast_t)); | 15 | int8_t, char *, uint8_t (*)(cube_t)); |
| 16 | _static uint8_t estimate_simple(cube_fast_t); | 16 | _static uint8_t estimate_simple(cube_t); |
| 17 | _static int64_t solve_simple(cube_t, int8_t, int8_t, int64_t, int8_t, char *); | 17 | _static int64_t solve_simple(cube_t, int8_t, int8_t, int64_t, int8_t, char *); |
| 18 | 18 | ||
| 19 | int64_t | 19 | int64_t |
| @@ -135,7 +135,7 @@ solve_generic( | |||
| 135 | int64_t maxsols, | 135 | int64_t maxsols, |
| 136 | int8_t optimal, | 136 | int8_t optimal, |
| 137 | char *sols, | 137 | char *sols, |
| 138 | uint8_t (*estimate)(cube_fast_t) | 138 | uint8_t (*estimate)(cube_t) |
| 139 | /* TODO: add validator */ | 139 | /* TODO: add validator */ |
| 140 | /* TODO: maybe add data for estimate */ | 140 | /* TODO: maybe add data for estimate */ |
| 141 | /* TODO: add moveset (and allowednext?) */ | 141 | /* TODO: add moveset (and allowednext?) */ |
| @@ -190,7 +190,7 @@ solve_generic( | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | arg = (dfsarg_generic_t) { | 192 | arg = (dfsarg_generic_t) { |
| 193 | .cube = cubetofast(cube), | 193 | .cube = cube, |
| 194 | .maxsols = maxsols, | 194 | .maxsols = maxsols, |
| 195 | .nextsol = &sols, | 195 | .nextsol = &sols, |
| 196 | .nsols = &ret, | 196 | .nsols = &ret, |
| @@ -223,9 +223,9 @@ solve_generic( | |||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | _static uint8_t | 225 | _static uint8_t |
| 226 | estimate_simple(cube_fast_t cube) | 226 | estimate_simple(cube_t cube) |
| 227 | { | 227 | { |
| 228 | return issolved_fast(cube) ? 0 : 1; | 228 | return issolved(cube) ? 0 : 1; |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | _static int64_t | 231 | _static int64_t |
