
Example: Magic squares More...
Public Types | |
| enum | { BRANCH_SIZE , BRANCH_AFC_SIZE , BRANCH_CBS_MAX_SD } |
| Branching to use for model. More... | |
| enum | { BRANCH_SIZE , BRANCH_AFC_SIZE } |
| Branching to use for model. More... | |
Public Member Functions | |
| MagicSquare (const SizeOptions &opt) | |
| Post constraints. | |
| MagicSquare (MagicSquare &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (void) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
| MagicSquare (const SizeOptions &opt) | |
| Post constraints. | |
| MagicSquare (MagicSquare &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (void) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| 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. | |
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< BaseSpace > | |
| static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
| Choose output stream according to sn. | |
| template<class Script , template< class > class Engine, class Options > | |
| static void | run (const Options &opt, Script *s=NULL) |
Example: Magic squares
Compute magic squares of arbitrary size
See problem 19 at http://www.csplib.org/.
Definition at line 61 of file magic-square-partial.cpp.
Branching to use for model.
| Enumerator | |
|---|---|
| BRANCH_SIZE | Branch by size. |
| BRANCH_AFC_SIZE | Branch by size over AFC. |
| BRANCH_CBS_MAX_SD | Use maximum solution density. |
Definition at line 74 of file magic-square-partial.cpp.
Branching to use for model.
| Enumerator | |
|---|---|
| BRANCH_SIZE | Branch by size. |
| BRANCH_AFC_SIZE | Branch by size over AFC. |
Definition at line 59 of file magic-square.cpp.
|
inline |
Post constraints.
Definition at line 80 of file magic-square-partial.cpp.
|
inline |
Constructor for cloning s.
Definition at line 137 of file magic-square-partial.cpp.
|
inline |
Post constraints.
Definition at line 64 of file magic-square.cpp.
|
inline |
Constructor for cloning s.
Definition at line 109 of file magic-square.cpp.
Copy during cloning.
Definition at line 144 of file magic-square-partial.cpp.
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 149 of file magic-square-partial.cpp.
Copy during cloning.
Definition at line 115 of file magic-square.cpp.
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 120 of file magic-square.cpp.
Main-function.
Definition at line 168 of file magic-square-partial.cpp.