Generated on Sat Feb 7 2015 02:01:38 for Gecode by doxygen 1.8.9.1
BlackHole Class Reference

Example: Black hole patience More...

Public Types

enum  { SYMMETRY_NONE, SYMMETRY_CONDITIONAL }
 Symmetry variants. More...
 
enum  { PROPAGATION_REIFIED, PROPAGATION_DFA, PROPAGATION_TUPLE_SET }
 Propagation of placement-rules. More...
 

Public Member Functions

 BlackHole (const SizeOptions &opt)
 Actual model. More...
 
virtual void print (std::ostream &os) const
 Print instance and solution. More...
 
 BlackHole (bool share, BlackHole &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. More...
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (void)
 Default constructor. More...
 
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning. More...
 
virtual void compare (const Space &, std::ostream &os) const
 Compare with s. More...
 

Static Public Member Functions

static int val (const Space &, IntVar x, int)
 Value selection function for branching. More...
 
- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
static std::ostream & select_ostream (const char *name, std::ofstream &ofs)
 Choose output stream according to name. More...
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

Protected Member Functions

std::string card (int val) const
 Return a string representing the card of value val. More...
 

Protected Attributes

IntVarArray x
 Card at position. More...
 
IntVarArray y
 Position of card. More...
 

Related Functions

(Note that these are not member functions.)

int main (int argc, char *argv[])
 Main-function. More...
 

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 conditional symmetry identified in the above paper can be eliminated (enabled by default).

Definition at line 104 of file black-hole.cpp.

Constructor & Destructor Documentation

BlackHole::BlackHole ( const SizeOptions opt)
inline

Actual model.

Definition at line 131 of file black-hole.cpp.

BlackHole::BlackHole ( bool  share,
BlackHole s 
)
inline

Constructor for cloning s.

Definition at line 285 of file black-hole.cpp.

Member Function Documentation

std::string BlackHole::card ( int  val) const
inlineprotected

Return a string representing the card of value val.

Definition at line 111 of file black-hole.cpp.

static int BlackHole::val ( const Space ,
IntVar  x,
int   
)
inlinestatic

Value selection function for branching.

Definition at line 245 of file black-hole.cpp.

virtual void BlackHole::print ( std::ostream &  os) const
inlinevirtual

Print instance and solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 259 of file black-hole.cpp.

virtual Space* BlackHole::copy ( bool  share)
inlinevirtual

Copy during cloning.

Definition at line 291 of file black-hole.cpp.

Friends And Related Function Documentation

int main ( int  argc,
char *  argv[] 
)
related

Main-function.

Definition at line 300 of file black-hole.cpp.

Member Data Documentation

IntVarArray BlackHole::x
protected

Card at position.

Definition at line 106 of file black-hole.cpp.

IntVarArray BlackHole::y
protected

Position of card.

Definition at line 106 of file black-hole.cpp.


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