Queens Class Reference
Example scripts (models)

Example: n-Queens puzzle More...

## 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 Space * | copy (void)
| Perform copying during cloning.
virtual void | print (std::ostream &os) const
| Print solution.
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
| ScriptBase (const Options &opt)
| Constructor.
| ScriptBase (ScriptBase &e)
| Constructor used for cloning.
virtual void | compare (const Space &home, std::ostream &os) const
| Compare with s.
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace >
| IgnoreStepOption (const Options &)
| Constructor.
| IgnoreStepOption (BaseSpace &e)
| Constructor used for cloning.

## Public Attributes

IntVarArray | q
| Position of queens on boards.

## Related Symbols

(Note that these are not member symbols.)
int | main (int argc, char *argv[])
| Main-function.

## Additional Inherited Members

Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs)
| Choose output stream according to sn.
static void | run (const Options &opt, Script *s=NULL)

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

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() [1/2]

Queens::Queens | ( | const SizeOptions & | opt | ) |

inline

The actual problem.

Definition at line 67 of file queens.cpp.

## Queens() [2/2]

Queens::Queens | ( | Queens & | s | ) |

inline

Constructor for cloning s.

Definition at line 97 of file queens.cpp.

## Member Function Documentation

## copy()

virtual Space * Queens::copy | ( | void |  | ) |

inline virtual

Perform copying during cloning.

Definition at line 103 of file queens.cpp.

## print()

virtual void Queens::print | ( | std::ostream & | os | ) | const

inline virtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.

Definition at line 109 of file queens.cpp.

## Friends And Related Symbol Documentation

## main()

int main | ( | int | argc,
|  | char * | argv[] )

related

Main-function.

Definition at line 190 of file queens.cpp.

## Member Data Documentation

## q

IntVarArray Queens::q

Position of queens on boards.

Definition at line 59 of file queens.cpp.

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

- examples/queens.cpp