Queens Class Reference
[Scripts for problems]
Inherits Example.
Detailed Description
Example: n-Queens puzzlePlace n queens on an n times n chessboard such that they do not attack each other.
Definition at line 50 of file queens.cc.
Public Types | |
enum | { PROP_BINARY, PROP_MIXED, PROP_DISTINCT } |
Propagation to use for model. More... | |
Public Member Functions | |
Queens (const SizeOptions &opt) | |
The actual problem. | |
Queens (bool share, Queens &s) | |
Constructor for cloning s. | |
virtual Space * | copy (bool share) |
Perform copying during cloning. | |
virtual void | print (std::ostream &os) |
Print solution. | |
virtual void | getVars (Gecode::Reflection::VarMap &vm, bool registerOnly) |
Make variables available for visualisation. | |
Protected Attributes | |
IntVarArray | q |
Position of queens on boards. |
Member Enumeration Documentation
anonymous enum |
Constructor & Destructor Documentation
Queens::Queens | ( | const SizeOptions & | opt | ) | [inline] |
Queens::Queens | ( | bool | share, | |
Queens & | s | |||
) | [inline] |
Member Function Documentation
virtual Space* Queens::copy | ( | bool | share | ) | [inline, virtual] |
virtual void Queens::print | ( | std::ostream & | os | ) | [inline, virtual] |
virtual void Queens::getVars | ( | Gecode::Reflection::VarMap & | vm, | |
bool | registerOnly | |||
) | [inline, virtual] |
Member Data Documentation
IntVarArray Queens::q [protected] |
The documentation for this class was generated from the following file:
- examples/queens.cc (Revision: 5789)