Example: Solving Sudoku puzzles using both set and integer constraints More...
Public Member Functions | |
SudokuMixed (const SizeOptions &opt) | |
Constructor. | |
SudokuMixed (SudokuMixed &s) | |
Constructor for cloning s. | |
virtual Space * | copy (void) |
Perform copying during cloning. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
Public Member Functions inherited from SudokuInt | |
SudokuInt (const SizeOptions &opt) | |
Constructor. | |
SudokuInt (SudokuInt &s) | |
Constructor for cloning s. | |
Public Member Functions inherited from Sudoku | |
Sudoku (const SizeOptions &opt) | |
Constructor. | |
Sudoku (Sudoku &s) | |
Constructor for cloning s. | |
Sudoku (const SizeOptions &opt) | |
Constructor. | |
Sudoku (Sudoku &s) | |
Constructor for cloning s. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > > | |
ScriptBase (const Options &opt) | |
Constructor. | |
ScriptBase (ScriptBase &e) | |
Constructor used for cloning. | |
virtual void | compare (const Space &home, std::ostream &os) const |
Compare with s. | |
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace > | |
IgnoreStepOption (const Options &) | |
Constructor. | |
IgnoreStepOption (BaseSpace &e) | |
Constructor used for cloning. | |
Public Member Functions inherited from SudokuSet | |
SudokuSet (const SizeOptions &opt) | |
Constructor. | |
SudokuSet (SudokuSet &s) | |
Constructor for cloning s. |
Additional Inherited Members | |
Public Types inherited from SudokuInt | |
enum | { PROP_NONE , PROP_SAME } |
Propagation variants. More... | |
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< Driver::IgnoreStepOption< Space > > | |
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
Choose output stream according to sn. | |
static void | run (const Options &opt, Script *s=NULL) |
Protected Attributes inherited from SudokuInt | |
IntVarArray | x |
Values for the fields. | |
Protected Attributes inherited from Sudoku | |
const int | n |
The size of the problem. | |
IntVarArray | x |
Values for the fields. | |
Protected Attributes inherited from SudokuSet | |
SetVarArray | y |
The fields occupied by a certain number. | |
Related Symbols inherited from Sudoku | |
int | main (int argc, char *argv[]) |
Main-function. | |
const char * | examples [] |
The specifications. | |
const unsigned int | n_examples = sizeof(examples)/sizeof(char*) |
The number of instances. | |
int | example_size (const char *s) |
The size of an instance. | |
int | sudokuField (const char *s, int n, int i, int j) |
Return value at position (i,j) in the example s of size n. |
Example: Solving Sudoku puzzles using both set and integer constraints
Definition at line 357 of file sudoku-advanced.cpp.
|
inline |
Constructor.
Definition at line 360 of file sudoku-advanced.cpp.
|
inline |
Constructor for cloning s.
Definition at line 385 of file sudoku-advanced.cpp.
|
inlinevirtual |
Perform copying during cloning.
Reimplemented from SudokuInt.
Definition at line 390 of file sudoku-advanced.cpp.
|
inlinevirtual |