aboutsummaryrefslogtreecommitdiff
path: root/cpp/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 /cpp/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 'cpp/nissy.h')
-rw-r--r--cpp/nissy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/nissy.h b/cpp/nissy.h
index db8ba5f..4b9c1c9 100644
--- a/cpp/nissy.h
+++ b/cpp/nissy.h
@@ -91,8 +91,8 @@ namespace nissy {
91 error check_data(); 91 error check_data();
92 void unload_data(); 92 void unload_data();
93 solve_result solve(const cube&, nissflag, unsigned minmoves, 93 solve_result solve(const cube&, nissflag, unsigned minmoves,
94 unsigned maxmoves, unsigned maxsols, int optimal, 94 unsigned maxmoves, unsigned maxsols, unsigned optimal,
95 int threads); 95 unsigned threads);
96 96
97 static std::variant<solver, error> get(const std::string&); 97 static std::variant<solver, error> get(const std::string&);
98 private: 98 private:

Generated with cgit - Back to sebastiano.tronto.net