Generated on Sat Feb 7 2015 02:01:38 for Gecode by doxygen 1.8.9.1
OrthoLatinSquare Class Reference

Example: Orthogonal latin squares More...

Public Member Functions

IntVary1 (int i, int j)
 Access field at position i and j in first square. More...
 
const IntVary1 (int i, int j) const
 Access field at position i and j in first square. More...
 
IntVary2 (int i, int j)
 Access field at position i and j in second square. More...
 
const IntVary2 (int i, int j) const
 Access field at position i and j in second square. More...
 
 OrthoLatinSquare (const SizeOptions &opt)
 Actual model. More...
 
 OrthoLatinSquare (bool share, OrthoLatinSquare &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 (void)
 Default constructor. More...
 
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning. More...
 
virtual void compare (const Space &, std::ostream &os) const
 Compare with s. More...
 

Protected Attributes

const int n
 Size of squares. More...
 
IntVarArray x1
 Fields of first square. More...
 
IntVarArray x2
 Fields of second square. 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: Orthogonal latin squares

Definition at line 48 of file ortho-latin.cpp.

Constructor & Destructor Documentation

OrthoLatinSquare::OrthoLatinSquare ( const SizeOptions opt)
inline

Actual model.

Definition at line 76 of file ortho-latin.cpp.

OrthoLatinSquare::OrthoLatinSquare ( bool  share,
OrthoLatinSquare s 
)
inline

Constructor for cloning s.

Definition at line 132 of file ortho-latin.cpp.

Member Function Documentation

IntVar& OrthoLatinSquare::y1 ( int  i,
int  j 
)
inline

Access field at position i and j in first square.

Definition at line 59 of file ortho-latin.cpp.

const IntVar& OrthoLatinSquare::y1 ( int  i,
int  j 
) const
inline

Access field at position i and j in first square.

Definition at line 63 of file ortho-latin.cpp.

IntVar& OrthoLatinSquare::y2 ( int  i,
int  j 
)
inline

Access field at position i and j in second square.

Definition at line 67 of file ortho-latin.cpp.

const IntVar& OrthoLatinSquare::y2 ( int  i,
int  j 
) const
inline

Access field at position i and j in second square.

Definition at line 71 of file ortho-latin.cpp.

virtual Space* OrthoLatinSquare::copy ( bool  share)
inlinevirtual

Copy during cloning.

Definition at line 140 of file ortho-latin.cpp.

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

Print solution.

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

Definition at line 145 of file ortho-latin.cpp.

Friends And Related Function Documentation

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

Main function.

Definition at line 173 of file ortho-latin.cpp.

Member Data Documentation

const int OrthoLatinSquare::n
protected

Size of squares.

Definition at line 51 of file ortho-latin.cpp.

IntVarArray OrthoLatinSquare::x1
protected

Fields of first square.

Definition at line 53 of file ortho-latin.cpp.

IntVarArray OrthoLatinSquare::x2
protected

Fields of second square.

Definition at line 55 of file ortho-latin.cpp.


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