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

Knights Class Reference
[Example scripts (models)]

Inherits Example.

List of all members.


Detailed Description

Example: n-Knights tour

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

Definition at line 35 of file knights.cc.

Public Member Functions

int field (int i, int j)
 Return field at position i, j.
 Knights (const Options &opt)
 The actual model.
 Knights (bool share, Knights &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (void)
 Print board.


Constructor & Destructor Documentation

Knights::Knights const Options opt  )  [inline]
 

The actual model.

Definition at line 50 of file knights.cc.

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

Constructor for cloning s.

Definition at line 109 of file knights.cc.


Member Function Documentation

int Knights::field int  i,
int  j
[inline]
 

Return field at position i, j.

Definition at line 45 of file knights.cc.

virtual Space* Knights::copy bool  share  )  [inline, virtual]
 

Copy during cloning.

Implements Gecode::Space.

Definition at line 114 of file knights.cc.

virtual void Knights::print void   )  [inline, virtual]
 

Print board.

Reimplemented from Example.

Definition at line 119 of file knights.cc.


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