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

MagicSquare Class Reference
[Scripts for problems]

Inherits Example.

List of all members.


Detailed Description

Example: Magic squares

Compute magic squares of arbitrary size

See problem 19 at http://www.csplib.org/.

Definition at line 51 of file magic-square.cc.


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)
 Print solution.

Constructor & Destructor Documentation

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

Post constraints.

Definition at line 60 of file magic-square.cc.

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

Constructor for cloning s.

Definition at line 98 of file magic-square.cc.


Member Function Documentation

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

Copy during cloning.

Implements Gecode::Space.

Definition at line 104 of file magic-square.cc.

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

Print solution.

Reimplemented from Example.

Definition at line 109 of file magic-square.cc.


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