
Example: Solving Sudoku puzzles using set constraints More...
Public Member Functions | |
| SudokuSet (const SizeOptions &opt) | |
| Constructor. More... | |
| SudokuSet (bool share, SudokuSet &s) | |
| Constructor for cloning s. More... | |
| virtual Space * | copy (bool share) |
| Perform copying during cloning. More... | |
| virtual void | print (std::ostream &os) const |
| Print solution. More... | |
Public Member Functions inherited from Sudoku | |
| Sudoku (const SizeOptions &opt) | |
| Constructor. More... | |
| Sudoku (bool share, Sudoku &s) | |
| Constructor for cloning s. More... | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| ScriptBase (const Options &opt) | |
| Constructor. More... | |
| ScriptBase (bool share, ScriptBase &e) | |
| Constructor used for cloning. More... | |
| virtual void | compare (const Space &home, std::ostream &os) const |
| Compare with s. More... | |
Protected Attributes | |
| SetVarArray | y |
| The fields occupied by a certain number. More... | |
Protected Attributes inherited from Sudoku | |
| const int | n |
| The size of the problem. More... | |
Additional Inherited Members | |
Public Types inherited from Sudoku | |
| enum | { MODEL_INT, MODEL_SET, MODEL_MIXED } |
| Model variants. More... | |
| enum | { BRANCH_NONE, BRANCH_SIZE, BRANCH_SIZE_DEGREE, BRANCH_SIZE_AFC, BRANCH_AFC } |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| 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) |
Related Functions inherited from Sudoku | |
| int | main (int argc, char *argv[]) |
| Main-function. More... | |
| 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... | |
Example: Solving Sudoku puzzles using set constraints
Definition at line 249 of file sudoku.cpp.
|
inline |
Constructor.
Definition at line 255 of file sudoku.cpp.
|
inline |
Constructor for cloning s.
Definition at line 327 of file sudoku.cpp.
|
inlinevirtual |
Perform copying during cloning.
Reimplemented in SudokuMixed.
Definition at line 333 of file sudoku.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Reimplemented in SudokuMixed.
Definition at line 339 of file sudoku.cpp.
|
protected |
The fields occupied by a certain number.
Definition at line 252 of file sudoku.cpp.