Example: Clique-based graph coloring More...
Public Types | |
enum | { MODEL_NONE, MODEL_CLIQUE } |
Model variants. More... | |
enum | { BRANCH_DEGREE, BRANCH_SIZE, BRANCH_SIZE_DEGREE, BRANCH_SIZE_AFC } |
Branching to use for model. More... | |
Public Member Functions | |
GraphColor (const SizeOptions &opt) | |
The actual model. More... | |
virtual IntVar | cost (void) const |
Cost function. More... | |
GraphColor (bool share, GraphColor &s) | |
Constructor for cloning s. More... | |
virtual Space * | copy (bool share) |
Copying during cloning. More... | |
virtual void | print (std::ostream &os) const |
Print the solution. 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... | |
template<class Script , template< class > class Engine, class Options > | |
void | run (const Options &o) |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
Graph specification for graph coloring | |
The edges are described by an array of integers with even number of elements, terminated by the elements -1,-1. The cliques are described by an array of integers, where the first integer gives the size of the clique, the following elements are nodes for each clique. The cliques are terminated by -1 for clique size | |
const int | g1_e [] |
First example graph: edges. More... | |
const int | g1_c [] |
First example graph: cliques. More... | |
const GraphColorSpec | g1 (200, g1_e, g1_c) |
First example graph. More... | |
const int | g2_e [] |
Second example graph: edges. More... | |
const int | g2_c [] |
Second example graph: cliques. More... | |
const GraphColorSpec | g2 (200, g2_e, g2_c) |
Second example graph. More... | |
Additional Inherited Members | |
![]() | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt) |
Example: Clique-based graph coloring
Definition at line 311 of file graph-color.cpp.
anonymous enum |
Model variants.
Enumerator | |
---|---|
MODEL_NONE |
No lower bound. |
MODEL_CLIQUE |
Use maximal clique size as lower bound. |
Definition at line 320 of file graph-color.cpp.
anonymous enum |
Branching to use for model.
Definition at line 325 of file graph-color.cpp.
|
inline |
The actual model.
Definition at line 332 of file graph-color.cpp.
|
inline |
Constructor for cloning s.
Definition at line 376 of file graph-color.cpp.
|
inlinevirtual |
Cost function.
Definition at line 372 of file graph-color.cpp.
|
inlinevirtual |
Copying during cloning.
Definition at line 382 of file graph-color.cpp.
|
inlinevirtual |
Print the solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 387 of file graph-color.cpp.
|
related |
First example graph: edges.
Definition at line 66 of file graph-color.cpp.
|
related |
First example graph: cliques.
Definition at line 118 of file graph-color.cpp.
|
related |
First example graph.
|
related |
Second example graph: edges.
Definition at line 192 of file graph-color.cpp.
|
related |
Second example graph: cliques.
Definition at line 228 of file graph-color.cpp.
|
related |
Second example graph.
|
related |
Main-function.
Definition at line 404 of file graph-color.cpp.