Generated on Thu Mar 22 10:39:52 2012 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 (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 57 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 62 of file queens.cpp.

## Constructor & Destructor Documentation

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

The actual problem.

Definition at line 68 of file queens.cpp.

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

Constructor for cloning s.

Definition at line 98 of file queens.cpp.

## Member Function Documentation

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

Perform copying during cloning.

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

## Member Data Documentation

Position of queens on boards.

Definition at line 60 of file queens.cpp.

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