Generated on Thu Jan 14 2016 02:26:06 for Gecode by doxygen 1.8.5
MagicSquare Class Reference

Example: Magic squares More...

Public Types

enum  { BRANCH_SIZE, BRANCH_AFC_SIZE }
 Branching to use for model. More...
 

Public Member Functions

 MagicSquare (const SizeOptions &opt)
 Post constraints. More...
 
 MagicSquare (bool share, MagicSquare &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (const Options &opt)
 Constructor. More...
 
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning. More...
 
virtual void compare (const Space &home, std::ostream &os) const
 Compare with s. More...
 

Related Functions

(Note that these are not member functions.)

int main (int argc, char *argv[])
 Main-function. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
static std::ostream & select_ostream (const char *name, std::ofstream &ofs)
 Choose output stream according to name. More...
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

Detailed Description

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.

Member Enumeration Documentation

anonymous enum

Branching to use for model.

Enumerator
BRANCH_SIZE 

Branch by size.

BRANCH_AFC_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)
inlinevirtual

Copy during cloning.

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

virtual void MagicSquare::print ( std::ostream &  os) const
inlinevirtual

Print solution.

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

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

Friends And Related Function Documentation

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

Main-function.

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


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