Knights Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: n-Knights tourFill 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 Space * | copy (bool share) |
Copy during cloning. | |
virtual void | print (void) |
Print board. |
Constructor & Destructor Documentation
|
The actual model.
Definition at line 50 of file knights.cc. |
|
Constructor for cloning s.
Definition at line 109 of file knights.cc. |
Member Function Documentation
|
Return field at position i, j.
Definition at line 45 of file knights.cc. |
|
Copy during cloning.
Implements Gecode::Space. Definition at line 114 of file knights.cc. |
|
Print board.
Reimplemented from Example. Definition at line 119 of file knights.cc. |
The documentation for this class was generated from the following file:
- examples/knights.cc (Revision: 3517)