Knights Class Reference
Base-class for Knights tour example. More...
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 |
Constructor & Destructor Documentation
| Knights::Knights | ( | const SizeOptions & | opt | ) | [inline] |
| Knights::Knights | ( | bool | share, | |
| Knights & | s | |||
| ) | [inline] |
Member Function Documentation
| int Knights::field | ( | int | x, | |
| int | y | |||
| ) | const [inline] |
| void Knights::neighbours | ( | int | f, | |
| int | nbs[8], | |||
| int & | n_nbs | |||
| ) | [inline] |
| 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] |
IntVarArray Knights::succ [protected] |
The documentation for this class was generated from the following file:
- examples/knights.cpp (Revision: 8649)
