v2.20.0
BoundSolver API — factory-time chain construction
Solver.Factory.createSolver(csp) and createSolver(csp, objective) now return a BoundSolver with the CSP already bound, eliminating the redundant double-passing at call sites.
API changes
Before:
Solver solver = Solver.Factory.INSTANCE.createSolver();
solver.getSolutions(csp).forEach(...);
solver.getSolution(csp, objective);After:
Solver.Factory.INSTANCE.createSolver(csp).getSolutions().forEach(...);
Solver.Factory.INSTANCE.createSolver(csp, objective).getSolution();Details
createSolver(csp)— satisfaction chain; returns a lambdaBoundSolverbacked by the full decorator chain (NodeConsistency → PropagationFixpoint → IndependentSubproblems → TreeDecomposition → CutsetConditioning → BacktrackingSearch)createSolver(csp, objective)— optimization chain; returns aBoundSolverwhosegetSolution()usesreduce((a,b) -> b)to return the global optimum (not the first improving candidate), andgetSolutions()streams the improving sequence- Two distinct chains: satisfaction snaps non-singleton
IntervalDomainvariables to midpoints; optimization leaves intervals open forBisectionConditioningSolver ConstraintSatisfactionProblem.isFullyDetermined()extracted fromSolverDecoratorfor reuse inBisectionConditioningSolver