Generated on Wed Nov 1 15:04:51 2006 for Gecode by doxygen 1.4.5

BlackHole Class Reference
[Example scripts (models)]

Inherits Example.

List of all members.


Detailed Description

Example: Black Hole Patience

This 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 Spacecopy (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]
 

Actual model.

Definition at line 149 of file black-hole.cc.

BlackHole::BlackHole bool  share,
BlackHole s
[inline]
 

Constructor for cloning s.

Definition at line 254 of file black-hole.cc.


Member Function Documentation

std::string BlackHole::card int  val  )  [inline, protected]
 

Return a string representing the card of value val.

Definition at line 140 of file black-hole.cc.

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]
 

Copy during cloning.

Implements Gecode::Space.

Definition at line 260 of file black-hole.cc.


Member Data Documentation

IntVarArray BlackHole::x [protected]
 

Card at position.

Definition at line 135 of file black-hole.cc.

IntVarArray BlackHole::y [protected]
 

Position of card.

Definition at line 135 of file black-hole.cc.


The documentation for this class was generated from the following file: