Generated on Tue Apr 18 10:23:01 2017 for Gecode by doxygen 1.6.3

MagicSquare Class Reference
[Example scripts (models)]

Example: Magic squares More...

List of all members.

Public Types


Branching to use for model.


Public Member Functions

 MagicSquare (const SizeOptions &opt)
 Post constraints.
 MagicSquare (bool share, MagicSquare &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (std::ostream &os) const
 Print solution.

Detailed Description

Example: Magic squares

Compute magic squares of arbitrary size

See problem 19 at

Definition at line 54 of file magic-square.cpp.

Member Enumeration Documentation

anonymous enum

Branching to use for model.


Branch by size.


Branch by size over AFC.

Definition at line 63 of file magic-square.cpp.

Constructor & Destructor Documentation

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

Post constraints.

Definition at line 68 of file magic-square.cpp.

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

Constructor for cloning s.

Definition at line 113 of file magic-square.cpp.

Member Function Documentation

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

Copy during cloning.

Definition at line 119 of file magic-square.cpp.

virtual void MagicSquare::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 124 of file magic-square.cpp.

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