BlackHole Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: Black Hole PatienceThis example solves instances of the black-hole patience game.
The model of the problem is mostly taken from "Search in the Patience Game 'Black Hole'", by Ian P. Gent, Chris Jefferson, Tom Kelsey, Inês Lynce, Ian Miguel, Peter Nightingale, Barbara M. Smith, and S. Armagan Tarim.
The smart version breaks the conditional symmetry identified in the above paper (enabled by default).
Definition at line 133 of file black-hole.cc.
Public Member Functions | |
BlackHole (const Options &opt) | |
Actual model. | |
virtual void | print (void) |
Print instance and solution. | |
BlackHole (bool share, BlackHole &s) | |
Constructor for cloning s. | |
virtual Space * | copy (bool share) |
Copy during cloning. | |
Protected Member Functions | |
std::string | card (int val) |
Return a string representing the card of value val. | |
Protected Attributes | |
IntVarArray | x |
Card at position. | |
IntVarArray | y |
Position of card. |
Constructor & Destructor Documentation
|
Actual model.
Definition at line 149 of file black-hole.cc. |
|
Constructor for cloning s.
Definition at line 254 of file black-hole.cc. |
Member Function Documentation
|
Return a string representing the card of value val.
Definition at line 140 of file black-hole.cc. |
|
Print instance and solution.
Reimplemented from Example. Definition at line 231 of file black-hole.cc. |
|
Copy during cloning.
Implements Gecode::Space. Definition at line 260 of file black-hole.cc. |
Member Data Documentation
|
Card at position.
Definition at line 135 of file black-hole.cc. |
|
Position of card.
Definition at line 135 of file black-hole.cc. |
The documentation for this class was generated from the following file:
- examples/black-hole.cc (Revision: 3569)