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

Example: Schur's lemma More...

Public Member Functions

 Schur (const SchurOptions &opt)
 Actual model. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
 Schur (bool share, Schur &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. 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

IntVarArray box
 Array of box per ball. 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: Schur's lemma

Put $n$ balls labeled ${1,\ldots,n}$ into $c$ boxes such that for any triple of balls $\langle x, y, z\rangle$ with $x+y = z$, not all are in the same box.

This problem has a solution for $c=3$ if $n < 14$.

See also problem 15 at http://www.csplib.org/.

Definition at line 87 of file schurs-lemma.cpp.

Constructor & Destructor Documentation

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.

Member Function Documentation

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

Print solution.

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

Definition at line 115 of file schurs-lemma.cpp.

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

Copy during cloning.

Definition at line 125 of file schurs-lemma.cpp.

Friends And Related Function Documentation

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

Main-function.

Definition at line 134 of file schurs-lemma.cpp.

Member Data Documentation

IntVarArray Schur::box
protected

Array of box per ball.

Definition at line 90 of file schurs-lemma.cpp.


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