OrthoLatinSquare Class Reference
Example scripts (models)

Example: Orthogonal latin squares More...

## Public Member Functions

IntVar & | y1 (int i, int j)
| Access field at position i and j in first square.
const IntVar & | y1 (int i, int j) const
| Access field at position i and j in first square.
IntVar & | y2 (int i, int j)
| Access field at position i and j in second square.
const IntVar & | y2 (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 Space * | copy (void)
| Copy during cloning.
virtual void | print (std::ostream &os) const
| Print solution.
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
| 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.
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace >
| IgnoreStepOption (const Options &)
| Constructor.
| IgnoreStepOption (BaseSpace &e)
| Constructor used for cloning.

## 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< Driver::IgnoreStepOption< Space > >
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs)
| Choose output stream according to sn.
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 |  | ) |

inline virtual

Copy during cloning.

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

## print()

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

inline virtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.

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:

- examples/ortho-latin.cpp