Generated on Tue May 22 09:40:49 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


Propagation to use for model.


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.


Use only binary disequality constraints.


Use single distinct and binary disequality constraints.


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: