Knights Class Reference
Inherits
Example.
Inherited by KnightsCircuit, and KnightsReified.
List of all members.
Detailed Description
Base-class for
Knights tour example.
Definition at line 42 of file knights.cc.
|
Public Types |
enum | { PROP_REIFIED,
PROP_CIRCUIT
} |
| Propagation to use for model. More...
|
Public Member Functions |
int | field (int x, int y) |
| 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) |
| Print board.
|
Protected Attributes |
const int | n |
| Size of board.
|
IntVarArray | succ |
| Maps board field to successor field.
|
Member Enumeration Documentation
Propagation to use for model.
- Enumerator:
-
PROP_REIFIED |
Use reified constraints. |
PROP_CIRCUIT |
Use single circuit constraints. |
Definition at line 50 of file knights.cc.
Constructor & Destructor Documentation
Knights::Knights |
( |
bool |
share, |
|
|
Knights & |
s | |
|
) |
| | [inline] |
Constructor for cloning s.
Definition at line 79 of file knights.cc.
Member Function Documentation
int Knights::field |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | [inline] |
Return field at position x, y.
Definition at line 56 of file knights.cc.
void Knights::neighbours |
( |
int |
f, |
|
|
int |
nbs[8], |
|
|
int & |
n_nbs | |
|
) |
| | [inline] |
Compute array of neighbours.
Definition at line 61 of file knights.cc.
virtual void Knights::print |
( |
std::ostream & |
os |
) |
[inline, virtual] |
Member Data Documentation
Maps board field to successor field.
Definition at line 47 of file knights.cc.
The documentation for this class was generated from the following file: