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. | |
![]() | |
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 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.
|
inlinevirtual |
Copy during cloning.
Definition at line 110 of file ind-set.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 115 of file ind-set.cpp.
|
inlinevirtual |
Return solution cost.
Definition at line 120 of file ind-set.cpp.
|
related |
Main-function.
Definition at line 56 of file ind-set.cpp.
|
related |
Main-function.
Definition at line 63 of file ind-set.cpp.
|
related |
Main-function.
Definition at line 130 of file ind-set.cpp.
|
protected |
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.