Generated on Fri Oct 19 11:25:42 2018 for Gecode by doxygen 1.6.3

Queens Class Reference
[Example scripts (models)]

Example: n-Queens puzzle More...

List of all members.

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 (Queens &s)
 Constructor for cloning s.
virtual Spacecopy (void)
 Perform copying during cloning.
virtual void print (std::ostream &os) const
 Print solution.

Public Attributes

IntVarArray q
 Position of queens on boards.

Detailed Description

Example: n-Queens puzzle

Place n queens on an n times n chessboard such that they do not attack each other.

Definition at line 56 of file queens.cpp.


Member Enumeration Documentation

anonymous enum

Propagation to use for model.

Enumerator:
PROP_BINARY 

Use only binary disequality constraints.

PROP_MIXED 

Use single distinct and binary disequality constraints.

PROP_DISTINCT 

Use three distinct constraints.

Definition at line 61 of file queens.cpp.


Constructor & Destructor Documentation

Queens::Queens ( const SizeOptions opt  )  [inline]

The actual problem.

Definition at line 67 of file queens.cpp.

Queens::Queens ( Queens s  )  [inline]

Constructor for cloning s.

Definition at line 97 of file queens.cpp.


Member Function Documentation

virtual Space* Queens::copy ( void   )  [inline, virtual]

Perform copying during cloning.

Definition at line 103 of file queens.cpp.

virtual void Queens::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 109 of file queens.cpp.


Member Data Documentation

Position of queens on boards.

Definition at line 59 of file queens.cpp.


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