Documentation ¶
Index ¶
- Constants
- func ExplainUnsat(pb *solver.Problem)
- func SolveManyGini(in io.Reader, out io.Writer)
- func SolveManyGophersat(in io.Reader, out io.Writer)
- func SolveWithCustomSolver(board *sudoku.Board, solver string)
- func SolveWithGini(board *sudoku.Board)
- func SolveWithGophersat(board *sudoku.Board)
- func SolveWithGophersatAndBase(board *sudoku.Board, base *CNF)
- type CNF
- type CNFBuilder
- type CNFInterface
- type CNFParallel
- type SimplifyOptions
- type WorkRequest
Constants ¶
View Source
const BIMANDER_FACTOR = 2
View Source
const COMMANDER_FACTOR = 3
Variables ¶
This section is empty.
Functions ¶
func ExplainUnsat ¶
func SolveManyGophersat ¶
only support gophersat since otherwise it has the overhead of spawning subproc
func SolveWithCustomSolver ¶
func SolveWithGini ¶
func SolveWithGophersat ¶
Types ¶
type CNF ¶
type CNF struct { CNFInterface Board *sudoku.Board Clauses [][]int // contains filtered or unexported fields }
func GetBase9x9Clauses ¶
func GetBase9x9Clauses() *CNF
func (*CNF) Simplify ¶
func (c *CNF) Simplify(options SimplifyOptions)
type CNFBuilder ¶
type CNFBuilder = func(c CNFInterface, lits []int) [][]int
type CNFInterface ¶
type CNFInterface interface { Simplify(SimplifyOptions) Print(w io.Writer) // contains filtered or unexported methods }
func GenerateCNFConstraints ¶
func GenerateCNFConstraints(s *sudoku.Board) CNFInterface
type CNFParallel ¶
type CNFParallel struct { CNFInterface *CNF // contains filtered or unexported fields }
func (*CNFParallel) Print ¶
func (c *CNFParallel) Print(w io.Writer)
func (*CNFParallel) Simplify ¶
func (c *CNFParallel) Simplify(options SimplifyOptions)
type SimplifyOptions ¶
type SimplifyOptions struct {
// contains filtered or unexported fields
}
type WorkRequest ¶
type WorkRequest struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.