Package zebra4j

Class PuzzleSolver

java.lang.Object
zebra4j.PuzzleSolver

@ThreadSafe public class PuzzleSolver extends Object
Solver for BasicPuzzle
  • Constructor Details

    • PuzzleSolver

      public PuzzleSolver(BasicPuzzle puzzle)
      Initialize a new solver with default configuration
      Parameters:
      puzzle - the puzzle to be solved, required
  • Method Details

    • solve

      public List<PuzzleSolution> solve()
      Solves the puzzles eagerly.
      Returns:
      a list of all distinct solution.
    • solveToStream

      public Stream<PuzzleSolution> solveToStream()
      Returns:
      a lazy stream of all solutions with possible duplicates
    • getChocoSettings

      public org.chocosolver.solver.Settings getChocoSettings()
      The settings for the underlying SAT solver
    • setChocoSettings

      public void setChocoSettings(org.chocosolver.solver.Settings chocoSettings)
      The settings for the underlying SAT solver