GraphColor Class Reference
[Scripts for problems]
Inherits Example.
Detailed Description
Example: Cliquebased graph coloringDefinition at line 308 of file graphcolor.cc.
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.  
const int  g1_c [] 
First example graph: cliques.  
const GraphColorSpec  g1 (200, g1_e, g1_c) 
First example graph.  
const int  g2_e [] 
Second example graph: edges.  
const int  g2_c [] 
Second example graph: cliques.  
const GraphColorSpec  g2 (200, g2_e, g2_c) 
Second example graph.  
Public Types  
enum  { MODEL_NONE, MODEL_CLIQUE } 
Model variants. More...  
enum  { BRANCH_DEGREE, BRANCH_SIZE, BRANCH_SIZE_DEGREE } 
Branching to use for model. More...  
Public Member Functions  
GraphColor (const SizeOptions &opt)  
The actual model.  
GraphColor (bool share, GraphColor &s)  
Constructor for cloning s.  
virtual Space *  copy (bool share) 
Copying during cloning.  
virtual void  print (std::ostream &os) 
Print the solution. 
Member Enumeration Documentation
anonymous enum 
anonymous enum 
Branching to use for model.
 Enumerator:

BRANCH_DEGREE Choose variable with largest degree. BRANCH_SIZE Choose variable with smallest size. BRANCH_SIZE_DEGREE Choose variable with smallest size/degree.
Definition at line 322 of file graphcolor.cc.
Constructor & Destructor Documentation
GraphColor::GraphColor  (  const SizeOptions &  opt  )  [inline] 
GraphColor::GraphColor  (  bool  share,  
GraphColor &  s  
)  [inline] 
Member Function Documentation
virtual Space* GraphColor::copy  (  bool  share  )  [inline, virtual] 
virtual void GraphColor::print  (  std::ostream &  os  )  [inline, virtual] 
Friends And Related Function Documentation
const int g1_e[] [related] 
const int g1_c[] [related] 
const GraphColorSpec g1(200, g1_e, g1_c) [related] 
First example graph.
const int g2_e[] [related] 
const int g2_c[] [related] 
const GraphColorSpec g2(200, g2_e, g2_c) [related] 
Second example graph.
The documentation for this class was generated from the following file:
 examples/graphcolor.cc (Revision: 5524)