Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jharris119/ExactCoverProblem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExactCoverProblem

Java module for solving exact cover problems

This is a module for solving exact cover problems that's intended to be composited into a enclosing "problem" class and called from there. See https://github.com/jharris119/pentominoes or https://github.com/jharris119/sudoku for examples.

The constructor takes a Set of "candidates" and a Set of "constraints" and leaves space in an abstract method for defining the relation between the two. ExactCoverProblem#relation should return true if constraint Q is satisfied by candidate P and false otherwise.

With the sets of constraints and candidates created, the only other exposed method is solve, which returns a subset P* of the candidates such that each constraint satisfies one and only member of P*.

About

Java module for solving exact cover problems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages