
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 (bool share, OrthoLatinSquare &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
Protected Attributes | |
| const int | n |
| Size of squares. | |
| IntVarArray | x1 |
| Fields of first square. | |
| IntVarArray | x2 |
| Fields of second square. | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main function. | |
Example: Orthogonal latin squares
Definition at line 48 of file ortho-latin.cpp.
| 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.
| 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 | ) | [inline, virtual] |
Copy during cloning.
Definition at line 140 of file ortho-latin.cpp.
| virtual void OrthoLatinSquare::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 145 of file ortho-latin.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) | [related] |
Main function.
Definition at line 173 of file ortho-latin.cpp.
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.