Example: Independent sets in a graph More...
Public Member Functions | |
IndSet (const SizeOptions &opt) | |
Actual model. More... | |
IndSet (bool share, IndSet &s) | |
Constructor for cloning s. More... | |
virtual Space * | copy (bool share) |
Copy during cloning. More... | |
virtual void | print (std::ostream &os) const |
Print solution. More... | |
virtual IntVar | cost (void) const |
Return solution cost. More... | |
![]() | |
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 | |
const Graph & | g |
Graph used More... | |
BoolVarArray | v |
Whether vertex included in independent set. More... | |
IntVar | k |
How many elements has indipendent set. More... | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
Graph specification for independent sets | |
const int | e_20_10 [] |
const Graph | g_20_10 (20, 10, e_20_10) |
const int | e_40_20 [] |
const Graph | g_40_20 (40, 20, e_40_20) |
Additional Inherited Members | |
![]() | |
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) |
Example: Independent sets in a graph
Definition at line 84 of file ind-set.cpp.
|
inline |
Actual model.
Definition at line 94 of file ind-set.cpp.
|
inline |
Constructor for cloning s.
Definition at line 107 of file ind-set.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 113 of file ind-set.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 118 of file ind-set.cpp.
|
inlinevirtual |
Return solution cost.
Definition at line 123 of file ind-set.cpp.
|
related |
Definition at line 60 of file ind-set.cpp.
|
related |
Definition at line 67 of file ind-set.cpp.
|
related |
Main-function.
Definition at line 133 of file ind-set.cpp.
|
protected |
Graph used
Definition at line 87 of file ind-set.cpp.
|
protected |
Whether vertex included in independent set.
Definition at line 89 of file ind-set.cpp.
|
protected |
How many elements has indipendent set.
Definition at line 91 of file ind-set.cpp.