
Example: Magic squares More...
Public Member Functions | |
| MagicSquare (const SizeOptions &opt) | |
| Post constraints. | |
| MagicSquare (bool share, MagicSquare &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Example: Magic squares
Compute magic squares of arbitrary size
See problem 19 at http://www.csplib.org/.
Definition at line 54 of file magic-square.cpp.
| MagicSquare::MagicSquare | ( | const SizeOptions & | opt | ) | [inline] |
Post constraints.
Definition at line 63 of file magic-square.cpp.
| MagicSquare::MagicSquare | ( | bool | share, |
| MagicSquare & | s | ||
| ) | [inline] |
Constructor for cloning s.
Definition at line 101 of file magic-square.cpp.
| virtual Space* MagicSquare::copy | ( | bool | share | ) | [inline, virtual] |
Copy during cloning.
Definition at line 107 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 112 of file magic-square.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) | [related] |
Main-function.
Definition at line 131 of file magic-square.cpp.