Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

# Queens Class Reference [Scripts for problems]

Inherits Example.

## 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 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 Spacecopy (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

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 56 of file queens.cc.

## Constructor & Destructor Documentation

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

The actual problem.

Definition at line 62 of file queens.cc.

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

Constructor for cloning s.

Definition at line 97 of file queens.cc.

## Member Function Documentation

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

Perform copying during cloning.

Implements Gecode::Space.

Definition at line 103 of file queens.cc.

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

Print solution.

Reimplemented from Example.

Definition at line 109 of file queens.cc.

 virtual void Queens::getVars ( Gecode::Reflection::VarMap & vm, bool registerOnly ) ` [inline, virtual]`

Make variables available for visualisation.

Reimplemented from Gecode::Space.

Definition at line 121 of file queens.cc.

## Member Data Documentation

 IntVarArray Queens::q` [protected]`

Position of queens on boards.

Definition at line 53 of file queens.cc.

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