Generated on Mon Jul 6 18:09:27 2009 for Gecode by doxygen 1.5.9

Knights Class Reference

Base-class for Knights tour example. More...

List of all members.

Public Types

enum  { PROP_REIFIED, PROP_CIRCUIT }
 Propagation to use for model. More...

Public Member Functions

int field (int x, int y) const
 Return field at position x, y.
void neighbours (int f, int nbs[8], int &n_nbs)
 Compute array of neighbours.
 Knights (const SizeOptions &opt)
 Constructor.
 Knights (bool share, Knights &s)
 Constructor for cloning s.
virtual void print (std::ostream &os) const
 Print board.

Protected Attributes

const int n
 Size of board.
IntVarArray succ
 Maps board field to successor field.


Detailed Description

Base-class for Knights tour example.

Definition at line 45 of file knights.cpp.


Member Enumeration Documentation

anonymous enum

Propagation to use for model.

Enumerator:
PROP_REIFIED  Use reified constraints.
PROP_CIRCUIT  Use single circuit constraints.

Definition at line 53 of file knights.cpp.


Constructor & Destructor Documentation

Knights::Knights ( const SizeOptions opt  )  [inline]

Constructor.

Definition at line 79 of file knights.cpp.

Knights::Knights ( bool  share,
Knights s 
) [inline]

Constructor for cloning s.

Definition at line 82 of file knights.cpp.


Member Function Documentation

int Knights::field ( int  x,
int  y 
) const [inline]

Return field at position x, y.

Definition at line 59 of file knights.cpp.

void Knights::neighbours ( int  f,
int  nbs[8],
int &  n_nbs 
) [inline]

Compute array of neighbours.

Definition at line 64 of file knights.cpp.

virtual void Knights::print ( std::ostream &  os  )  const [inline, virtual]

Print board.

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

Definition at line 87 of file knights.cpp.


Member Data Documentation

const int Knights::n [protected]

Size of board.

Definition at line 48 of file knights.cpp.

Maps board field to successor field.

Definition at line 50 of file knights.cpp.


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