
Example: Schur's lemma More...
Public Member Functions | |
| Schur (const SchurOptions &opt) | |
| Actual model. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
| Schur (bool share, Schur &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
Protected Attributes | |
| IntVarArray | box |
| Array of box per ball. | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Example: Schur's lemma
Put
balls labeled
into
boxes such that for any triple of balls
with
, not all are in the same box.
This problem has a solution for
if
.
See also problem 15 at http://www.csplib.org/.
Definition at line 87 of file schurs-lemma.cpp.
| Schur::Schur | ( | const SchurOptions & | opt | ) | [inline] |
Actual model.
Definition at line 93 of file schurs-lemma.cpp.
| Schur::Schur | ( | bool | share, |
| Schur & | s | ||
| ) | [inline] |
Constructor for cloning s.
Definition at line 120 of file schurs-lemma.cpp.
| virtual void Schur::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 115 of file schurs-lemma.cpp.
| virtual Space* Schur::copy | ( | bool | share | ) | [inline, virtual] |
Copy during cloning.
Definition at line 125 of file schurs-lemma.cpp.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) | [related] |
Main-function.
Definition at line 134 of file schurs-lemma.cpp.
IntVarArray Schur::box [protected] |
Array of box per ball.
Definition at line 90 of file schurs-lemma.cpp.