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

Example: n-Knight's tour (simple model) More...

Public Member Functions

 KnightsReified (const SizeOptions &opt)
 
 KnightsReified (bool share, KnightsReified &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. More...
 
- Public Member Functions inherited from Knights
int f (int x, int y) const
 Return field at position x, y. More...
 
int x (int f) const
 Return x coordinate at field f. More...
 
int y (int f) const
 Return y coordinate at field f. More...
 
IntSet neighbors (int i)
 Compute set of neighbour fields. More...
 
 Knights (const SizeOptions &opt)
 Constructor. More...
 
 Knights (bool share, Knights &s)
 Constructor for cloning s. More...
 
virtual void print (std::ostream &os) const
 Print board. 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...
 

Additional Inherited Members

- Public Types inherited from Knights
enum  { PROP_REIFIED, PROP_CIRCUIT }
 Propagation to use for model. More...
 
enum  { BRANCH_NAIVE, BRANCH_WARNSDORFF }
 Branching to use for model. 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)
 
- Public Attributes inherited from Knights
const int n
 Size of board. More...
 
IntVarArray succ
 Maps board field to successor field. More...
 

Detailed Description

Example: n-Knight's tour (simple model)

Fill an n times n chess board with knight's moves such that the knight does a full tour (last move reaches first move again). The formulation is due to Gert Smolka.

Definition at line 258 of file knights.cpp.

Constructor & Destructor Documentation

KnightsReified::KnightsReified ( const SizeOptions opt)
inline

Definition at line 260 of file knights.cpp.

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

Constructor for cloning s.

Definition at line 293 of file knights.cpp.

Member Function Documentation

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

Copy during cloning.

Definition at line 296 of file knights.cpp.


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