Example: Solitaire domino More...
Public Types | |
enum | { PROP_ELEMENT , PROP_EXTENSIONAL } |
Propagation to use for model. More... |
Public Member Functions | |
Domino (const SizeOptions &opt) | |
Actual model. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
Domino (Domino &s) | |
Constructor for cloning s. | |
virtual Space * | copy (void) |
Copy space during cloning. | |
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. |
Related Symbols | |
(Note that these are not member symbols.) | |
const unsigned int | n_examples |
Number of board specifications. | |
int | main (int argc, char *argv[]) |
Main-function. |
Puzzle specifications | |
const int * | specs [] |
Board specifications. | |
const int | domino0 [] |
Example 0 | |
const int | domino1 [] |
Example 1 | |
const int | domino2 [] |
Example 2 | |
const int | domino3 [] |
Example 3 | |
const int | domino4 [] |
Example 4 | |
const int | domino5 [] |
Example 5 | |
const unsigned | n_examples = sizeof(specs)/sizeof(int*) |
Number of specifications. |
Additional Inherited Members | |
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) |
Example: Solitaire domino
The task is to place domino pieces on a board. Each piece covers two fields and has two numbers. There are 28 pieces, from 0-0 to 6-6. The board is set up with a number in each field that must match the number of the domino piece placed on that field.
Definition at line 68 of file domino.cpp.
anonymous enum |
Propagation to use for model.
Enumerator | |
---|---|
PROP_ELEMENT | Use element constraints. |
PROP_EXTENSIONAL | Use extensional constraints. |
Definition at line 82 of file domino.cpp.
|
inline |
Actual model.
Definition at line 88 of file domino.cpp.
|
inline |
Constructor for cloning s.
Definition at line 206 of file domino.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.
Definition at line 193 of file domino.cpp.
|
inlinevirtual |
Copy space during cloning.
Definition at line 212 of file domino.cpp.
|
Board specifications.
List of specifications.
Definition at line 48 of file domino.cpp.
|
Number of board specifications.
Definition at line 53 of file domino.cpp.
|
Example 0
Definition at line 249 of file domino.cpp.
|
Example 1
Definition at line 263 of file domino.cpp.
|
Example 2
Definition at line 277 of file domino.cpp.
|
Example 3
Definition at line 291 of file domino.cpp.
|
Example 4
Definition at line 305 of file domino.cpp.
|
Example 5
Definition at line 319 of file domino.cpp.
|
Number of specifications.
Definition at line 336 of file domino.cpp.
|
Main-function.
Definition at line 223 of file domino.cpp.