
Example: Independent sets in a graph More...
Public Member Functions | |
| IndSet (const SizeOptions &opt) | |
| Actual model. | |
| IndSet (IndSet &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (void) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
| virtual IntVar | cost (void) const |
| Return solution cost. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| 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. | |
Protected Attributes | |
| const Graph & | g |
| Graph used | |
| BoolVarArray | v |
| Whether vertex included in independent set. | |
| IntVar | k |
| How many elements has indipendent set. | |
Graph specification for independent sets | |
| const int | e_20_10 [] |
| Main-function. | |
| const Graph | g_20_10 (20, 10, e_20_10) |
| Main-function. | |
| const int | e_40_20 [] |
| Main-function. | |
| const Graph | g_40_20 (40, 20, e_40_20) |
| Main-function. | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
| Choose output stream according to sn. | |
| template<class Script , template< class > class Engine, class Options > | |
| static void | run (const Options &opt, Script *s=NULL) |
Example: Independent sets in a graph
Definition at line 80 of file ind-set.cpp.
|
inline |
Actual model.
Definition at line 90 of file ind-set.cpp.
|
inline |
Constructor for cloning s.
Definition at line 104 of file ind-set.cpp.
Copy during cloning.
Definition at line 110 of file ind-set.cpp.
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 115 of file ind-set.cpp.
Return solution cost.
Definition at line 120 of file ind-set.cpp.
Main-function.
Definition at line 56 of file ind-set.cpp.
Main-function.
Definition at line 63 of file ind-set.cpp.
Main-function.
Definition at line 130 of file ind-set.cpp.
Graph used
Definition at line 83 of file ind-set.cpp.
|
protected |
Whether vertex included in independent set.
Definition at line 85 of file ind-set.cpp.
|
protected |
How many elements has indipendent set.
Definition at line 87 of file ind-set.cpp.