Example: Solving Sudoku puzzles using integer constraints More...
Public Types | |
enum | { PROP_NONE, PROP_SAME } |
Propagation variants. More... | |
Public Member Functions | |
SudokuInt (const SizeOptions &opt) | |
Constructor. | |
SudokuInt (bool share, SudokuInt &s) | |
Constructor for cloning s. | |
virtual Space * | copy (bool share) |
Perform copying during cloning. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
Protected Attributes | |
IntVarArray | x |
Values for the fields. |
Example: Solving Sudoku puzzles using integer constraints
Definition at line 99 of file sudoku.cpp.
anonymous enum |
Propagation variants.
PROP_NONE |
No additional constraints. |
PROP_SAME |
Use "same" constraint with integer model. |
Definition at line 106 of file sudoku.cpp.
SudokuInt::SudokuInt | ( | const SizeOptions & | opt | ) | [inline] |
Constructor.
Definition at line 112 of file sudoku.cpp.
SudokuInt::SudokuInt | ( | bool | share, |
SudokuInt & | s | ||
) | [inline] |
Constructor for cloning s.
Definition at line 189 of file sudoku.cpp.
virtual Space* SudokuInt::copy | ( | bool | share | ) | [inline, virtual] |
Perform copying during cloning.
Reimplemented in SudokuMixed.
Definition at line 195 of file sudoku.cpp.
virtual void SudokuInt::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Reimplemented in SudokuMixed.
Definition at line 201 of file sudoku.cpp.
IntVarArray SudokuInt::x [protected] |
Values for the fields.
Definition at line 102 of file sudoku.cpp.