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
BlackHole::BlackHole | ( | const Options & | opt | ) | [inline] |
BlackHole::BlackHole | ( | bool | share, | |
BlackHole & | s | |||
) | [inline] |
Member Function Documentation
std::string BlackHole::card | ( | int | val | ) | [inline, protected] |
virtual void BlackHole::print | ( | void | ) | [inline, virtual] |
Print instance and solution.
Reimplemented from Example.
Definition at line 231 of file black-hole.cc.
virtual Space* BlackHole::copy | ( | bool | share | ) | [inline, virtual] |
Member Data Documentation
IntVarArray BlackHole::x [protected] |
IntVarArray BlackHole::y [protected] |
The documentation for this class was generated from the following file:
- examples/black-hole.cc (Revision: 3569)