BlackHole Class Reference
[Scripts for problems]
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 conditional symmetry identified in the above paper can be eliminated (enabled by default).
Definition at line 178 of file black-hole.cc.
Public Types | |
enum | { MODEL_NONE, MODEL_SYMMETRY } |
Model variants. More... | |
enum | { PROPAGATION_REIFIED, PROPAGATION_DFA, PROPAGATION_TUPLE_SET } |
Propagation of placement-rules. More... | |
Public Member Functions | |
BlackHole (const SizeOptions &opt) | |
Actual model. | |
virtual void | print (std::ostream &os) |
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. |
Member Enumeration Documentation
anonymous enum |
anonymous enum |
Propagation of placement-rules.
- Enumerator:
-
PROPAGATION_REIFIED Reified propagation. PROPAGATION_DFA Extensional propagation using automatons. PROPAGATION_TUPLE_SET Extensional propagation using tables.
Definition at line 199 of file black-hole.cc.
Constructor & Destructor Documentation
BlackHole::BlackHole | ( | const SizeOptions & | opt | ) | [inline] |
BlackHole::BlackHole | ( | bool | share, | |
BlackHole & | s | |||
) | [inline] |
Member Function Documentation
std::string BlackHole::card | ( | int | val | ) | [inline, protected] |
virtual void BlackHole::print | ( | std::ostream & | os | ) | [inline, virtual] |
Print instance and solution.
Reimplemented from Example.
Definition at line 330 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: 6052)