Base class for Sudoku puzzles. More...
Public Types | |
enum | { MODEL_INT, MODEL_SET, MODEL_MIXED } |
Model variants. More... | |
enum | { BRANCH_NONE, BRANCH_SIZE, BRANCH_SIZE_DEGREE, BRANCH_SIZE_AFC, BRANCH_AFC } |
Public Member Functions | |
Sudoku (const SizeOptions &opt) | |
Constructor. More... | |
Sudoku (bool share, Sudoku &s) | |
Constructor for cloning s. More... | |
![]() | |
ScriptBase (void) | |
Default constructor. More... | |
ScriptBase (bool share, ScriptBase &e) | |
Constructor used for cloning. More... | |
virtual void | print (std::ostream &os) const |
Print a solution to os. More... | |
virtual void | compare (const Space &, std::ostream &os) const |
Compare with s. More... | |
Protected Attributes | |
const int | n |
The size of the problem. More... | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
Sudoku specifications | |
Each specification gives the initial positions that are filled in, with blank squares represented as zeroes. | |
const char * | examples [] |
The specifications. More... | |
const unsigned int | n_examples = sizeof(examples)/sizeof(char*) |
The number of instances. More... | |
int | example_size (const char *s) |
The size of an instance. More... | |
int | sudokuField (const char *s, int n, int i, int j) |
Return value at position (i,j) in the example s of size n. More... | |
Additional Inherited Members | |
![]() | |
static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
Choose output stream according to name. More... | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt, Script *s=NULL) |
Base class for Sudoku puzzles.
Definition at line 64 of file sudoku.cpp.
anonymous enum |
Model variants.
Enumerator | |
---|---|
MODEL_INT |
Use integer constraints. |
MODEL_SET |
Use set constraints. |
MODEL_MIXED |
Use both integer and set constraints. |
Definition at line 71 of file sudoku.cpp.
anonymous enum |
Enumerator | |
---|---|
BRANCH_NONE |
Use lexicographic ordering. |
BRANCH_SIZE |
Use minimum size. |
BRANCH_SIZE_DEGREE |
Use minimum size over degree. |
BRANCH_SIZE_AFC |
Use minimum size over afc. |
BRANCH_AFC |
Use maximum afc. |
Definition at line 78 of file sudoku.cpp.
|
inline |
Constructor.
Definition at line 87 of file sudoku.cpp.
|
inline |
Constructor for cloning s.
Definition at line 90 of file sudoku.cpp.
|
related |
The specifications.
Definition at line 469 of file sudoku.cpp.
|
related |
The number of instances.
Definition at line 2264 of file sudoku.cpp.
|
related |
Main-function.
Definition at line 411 of file sudoku.cpp.
|
related |
The size of an instance.
Definition at line 2267 of file sudoku.cpp.
|
related |
Return value at position (i,j) in the example s of size n.
Definition at line 2275 of file sudoku.cpp.
|
protected |
The size of the problem.
Definition at line 67 of file sudoku.cpp.