Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Example: Orthogonal latin squares More...

Public Member Functions

IntVary1 (int i, int j)
 Access field at position i and j in first square.
 
const IntVary1 (int i, int j) const
 Access field at position i and j in first square.
 
IntVary2 (int i, int j)
 Access field at position i and j in second square.
 
const IntVary2 (int i, int j) const
 Access field at position i and j in second square.
 
 OrthoLatinSquare (const SizeOptions &opt)
 Actual model.
 
 OrthoLatinSquare (OrthoLatinSquare &s)
 Constructor for cloning s.
 
virtual Spacecopy (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.
 

Protected Attributes

const int n
 Size of squares.
 
IntVarArray x1
 Fields of first square.
 
IntVarArray x2
 Fields of second square.
 

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)
 

Detailed Description

Example: Orthogonal latin squares

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

Constructor & Destructor Documentation

◆ OrthoLatinSquare() [1/2]

OrthoLatinSquare::OrthoLatinSquare ( const SizeOptions & opt)
inline

Actual model.

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

◆ OrthoLatinSquare() [2/2]

OrthoLatinSquare::OrthoLatinSquare ( OrthoLatinSquare & s)
inline

Constructor for cloning s.

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

Member Function Documentation

◆ y1() [1/2]

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

Access field at position i and j in first square.

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

◆ y1() [2/2]

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

Access field at position i and j in first square.

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

◆ y2() [1/2]

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

Access field at position i and j in second square.

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

◆ y2() [2/2]

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

Access field at position i and j in second square.

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

◆ copy()

virtual Space * OrthoLatinSquare::copy ( void )
inlinevirtual

Copy during cloning.

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

◆ print()

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

Print solution.

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

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

Friends And Related Symbol Documentation

◆ main()

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

Main function.

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

Member Data Documentation

◆ n

const int OrthoLatinSquare::n
protected

Size of squares.

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

◆ x1

IntVarArray OrthoLatinSquare::x1
protected

Fields of first square.

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

◆ x2

IntVarArray OrthoLatinSquare::x2
protected

Fields of second square.

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


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