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

Example: Golf tournament More...

Public Types

enum  { MODEL_PLAIN, MODEL_SYMMETRY }
 Model variants. More...
 

Public Member Functions

 Golf (const GolfOptions &opt)
 Actual model. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
 Golf (bool share, Golf &s)
 Constructor for copying 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...
 

Public Attributes

int g
 Number of groups in a week. More...
 
int s
 Number of players in a group. More...
 
int w
 Number of weeks. More...
 
SetVarArray groups
 The sets representing the groups. 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: Golf tournament

Schedule a golf tournament. This is problem 010 from csplib.

Note that "Modeling and Programming with Gecode" uses this example as a case study.

Definition at line 80 of file golf.cpp.

Constructor & Destructor Documentation

Golf::Golf ( const GolfOptions opt)
inline

Actual model.

Definition at line 95 of file golf.cpp.

Golf::Golf ( bool  share,
Golf s 
)
inline

Constructor for copying s.

Definition at line 165 of file golf.cpp.

Member Function Documentation

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

Print solution.

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

Definition at line 155 of file golf.cpp.

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

Copy during cloning.

Definition at line 170 of file golf.cpp.

Friends And Related Function Documentation

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

Main-function.

Definition at line 179 of file golf.cpp.

Member Data Documentation

int Golf::g

Number of groups in a week.

Definition at line 87 of file golf.cpp.

int Golf::s

Number of players in a group.

Definition at line 88 of file golf.cpp.

int Golf::w

Number of weeks.

Definition at line 89 of file golf.cpp.

SetVarArray Golf::groups

The sets representing the groups.

Definition at line 92 of file golf.cpp.


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