aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/solve.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-09-11 19:48:57 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-09-11 19:48:57 +0200
commit10b65003102675bd19c0e5174ff249be2a163bc7 (patch)
tree10388535f1395f084a1a0456094f90cc2390fc62 /src/solvers/h48/solve.h
parente6ff0ce6926fa921a13055c9c35d8e60b691e776 (diff)
downloadnissy-core-10b65003102675bd19c0e5174ff249be2a163bc7.tar.gz
nissy-core-10b65003102675bd19c0e5174ff249be2a163bc7.zip
Simplified solver
Diffstat (limited to 'src/solvers/h48/solve.h')
-rw-r--r--src/solvers/h48/solve.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index 26847b2..4bf55ca 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -31,7 +31,7 @@ STATIC uint32_t allowednextmove_h48(uint8_t *, uint8_t, uint32_t);
31STATIC void solve_h48_appendsolution(dfsarg_solveh48_t *); 31STATIC void solve_h48_appendsolution(dfsarg_solveh48_t *);
32STATIC_INLINE bool solve_h48_stop(dfsarg_solveh48_t *); 32STATIC_INLINE bool solve_h48_stop(dfsarg_solveh48_t *);
33STATIC int64_t solve_h48_dfs(dfsarg_solveh48_t *); 33STATIC int64_t solve_h48_dfs(dfsarg_solveh48_t *);
34STATIC int64_t solve_h48(cube_t, int8_t, int8_t, int8_t, uint8_t, uint8_t, const void *, char *); 34STATIC int64_t solve_h48(cube_t, int8_t, int8_t, int8_t, const void *, char *);
35 35
36STATIC int64_t solve_h48stats_dfs(dfsarg_solveh48stats_t *); 36STATIC int64_t solve_h48stats_dfs(dfsarg_solveh48stats_t *);
37STATIC int64_t solve_h48stats(cube_t, int8_t, const void *, char [static 12]); 37STATIC int64_t solve_h48stats(cube_t, int8_t, const void *, char [static 12]);
@@ -176,22 +176,26 @@ solve_h48(
176 int8_t minmoves, 176 int8_t minmoves,
177 int8_t maxmoves, 177 int8_t maxmoves,
178 int8_t maxsolutions, 178 int8_t maxsolutions,
179 uint8_t h,
180 uint8_t k,
181 const void *data, 179 const void *data,
182 char *solutions 180 char *solutions
183) 181)
184{ 182{
185 int64_t nsols; 183 int64_t nsols;
186 dfsarg_solveh48_t arg; 184 dfsarg_solveh48_t arg;
185 tableinfo_t info;
186
187 if(!readtableinfo_n(data, 2, &info)) {
188 LOG("solve_h48: error reading table\n");
189 return 0;
190 }
187 191
188 arg = (dfsarg_solveh48_t) { 192 arg = (dfsarg_solveh48_t) {
189 .cube = cube, 193 .cube = cube,
190 .inverse = inverse(cube), 194 .inverse = inverse(cube),
191 .nsols = &nsols, 195 .nsols = &nsols,
192 .maxsolutions = maxsolutions, 196 .maxsolutions = maxsolutions,
193 .h = h, 197 .h = info.h48h,
194 .k = k, 198 .k = info.bits,
195 .cocsepdata = get_cocsepdata_ptr(data), 199 .cocsepdata = get_cocsepdata_ptr(data),
196 .h48data = get_h48data_ptr(data), 200 .h48data = get_h48data_ptr(data),
197 .nextsol = &solutions 201 .nextsol = &solutions

Generated with cgit - Back to sebastiano.tronto.net