aboutsummaryrefslogtreecommitdiff
path: root/src/nissy.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-17 10:50:57 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-17 14:36:27 +0200
commit0ece4b72db22139db51e8f5f37c25f24c84f3e43 (patch)
treefa9d0f5ec4124b2e51194ec6dc888e037b9da7e2 /src/nissy.h
parent785f2859e336db49095a8443be8d204ba0989925 (diff)
downloadnissy-core-0ece4b72db22139db51e8f5f37c25f24c84f3e43.tar.gz
nissy-core-0ece4b72db22139db51e8f5f37c25f24c84f3e43.zip
Small rework of optimal vs maxsols
I wanted to make the "optimal" and "maxsolutions" options mutually exclusive, but in the end I decided there is value in keeping both (e.g. for specifying a limit to the number of solutions when asking for "all" optimal"). Now optimal cannot be negative anymore, for the same reason of maxsolutions. The interface user (shell, UI) will have to take care of handling this in a way that makes sense for the user. Usually this means setting the maximum number of solutions to UINT_MAX (or a similar very high number) when the user wants "all optimal".
Diffstat (limited to 'src/nissy.h')
-rw-r--r--src/nissy.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nissy.h b/src/nissy.h
index b13f417..c23f338 100644
--- a/src/nissy.h
+++ b/src/nissy.h
@@ -360,8 +360,7 @@ Parameters:
360 minmoves - The minimum number of moves for a solution. 360 minmoves - The minimum number of moves for a solution.
361 maxmoves - The maximum number of moves for a solution. 361 maxmoves - The maximum number of moves for a solution.
362 maxsols - The maximum number of solutions. 362 maxsols - The maximum number of solutions.
363 optimal - If set to a non-negative value, the maximum number of moves 363 optimal - The maximum number of moves above the optimal solution length.
364 above the optimal solution length.
365 threads - The number of threads to use. Must be less than or equalt to 364 threads - The number of threads to use. Must be less than or equalt to
366 the value of the compile-time constant THREADS. If set to 0, 365 the value of the compile-time constant THREADS. If set to 0,
367 the default value THREADS will be used. 366 the default value THREADS will be used.
@@ -393,8 +392,8 @@ nissy_solve(
393 unsigned minmoves, 392 unsigned minmoves,
394 unsigned maxmoves, 393 unsigned maxmoves,
395 unsigned maxsolutions, 394 unsigned maxsolutions,
396 int optimal, 395 unsigned optimal,
397 int threads, 396 unsigned threads,
398 unsigned long long data_size, 397 unsigned long long data_size,
399 const char data[data_size], 398 const char data[data_size],
400 unsigned sols_size, 399 unsigned sols_size,

Generated with cgit - Back to sebastiano.tronto.net