Generated on Tue Apr 18 10:23:02 2017 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 (bool share, Queens &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 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 60 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 65 of file queens.cpp.

Constructor & Destructor Documentation

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

The actual problem.

Definition at line 71 of file queens.cpp.

Queens::Queens ( bool  share,
Queens s 
) [inline]

Constructor for cloning s.

Definition at line 101 of file queens.cpp.

Member Function Documentation

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

Perform copying during cloning.

Definition at line 107 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 113 of file queens.cpp.

Member Data Documentation

Position of queens on boards.

Definition at line 63 of file queens.cpp.

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