diff options
Diffstat (limited to 'src/solvers/coord/solve.h')
| -rw-r--r-- | src/solvers/coord/solve.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h index 73ae9b1..6903d1e 100644 --- a/src/solvers/coord/solve.h +++ b/src/solvers/coord/solve.h | |||
| @@ -35,15 +35,17 @@ solve_coord_appendsolution(dfsarg_solve_coord_t *arg) | |||
| 35 | char *m; | 35 | char *m; |
| 36 | 36 | ||
| 37 | if (*arg->nsols >= arg->maxsolutions || | 37 | if (*arg->nsols >= arg->maxsolutions || |
| 38 | arg->nmoves > *arg->shortest_sol + arg->optimal) | 38 | arg->nmoves > *arg->shortest_sol + arg->optimal || |
| 39 | (arg->coord->is_admissible != NULL && | ||
| 40 | !arg->coord->is_admissible(arg->nmoves, arg->moves))) | ||
| 39 | return 0; | 41 | return 0; |
| 40 | 42 | ||
| 41 | sortparallel(arg->moves, arg->nmoves); | ||
| 42 | |||
| 43 | t = inverse_trans(arg->trans); | 43 | t = inverse_trans(arg->trans); |
| 44 | for (i = 0; i < arg->nmoves; i++) | 44 | for (i = 0; i < arg->nmoves; i++) |
| 45 | tmoves[i] = transform_move(arg->moves[i], t); | 45 | tmoves[i] = transform_move(arg->moves[i], t); |
| 46 | 46 | ||
| 47 | sortparallel(tmoves, arg->nmoves); | ||
| 48 | |||
| 47 | l = arg->solutions_size - *arg->solutions_used; | 49 | l = arg->solutions_size - *arg->solutions_used; |
| 48 | m = *arg->solutions + *arg->solutions_used; | 50 | m = *arg->solutions + *arg->solutions_used; |
| 49 | strl = writemoves(tmoves, arg->nmoves, l, m); | 51 | strl = writemoves(tmoves, arg->nmoves, l, m); |
