Generated on Sat Nov 11 01:12:18 2006 for Gecode by doxygen 1.5.1

GraphColor Class Reference
[Example scripts (models)]

Inherits Example.

List of all members.


Detailed Description

Example: Clique-based graph coloring

Definition at line 292 of file graph-color.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

static const int g1_e []
 First example graph: edges.
static const int g1_c []
 First example graph: cliques.
static const GraphColorSpec g1 (200, g1_e, g1_c)
 First example graph.
static const int g2_e []
 Second example graph: edges.
static const int g2_c []
 Second example graph: cliques.
static const GraphColorSpec g2 (200, g2_e, g2_c)
 Second example graph.

Public Member Functions

 GraphColor (const Options &opt)
 The actual model.
 GraphColor (bool share, GraphColor &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copying during cloning.
virtual void print (void)
 Print the solution.


Constructor & Destructor Documentation

GraphColor::GraphColor ( const Options opt  )  [inline]

The actual model.

Definition at line 301 of file graph-color.cc.

GraphColor::GraphColor ( bool  share,
GraphColor s 
) [inline]

Constructor for cloning s.

Definition at line 332 of file graph-color.cc.


Member Function Documentation

virtual Space* GraphColor::copy ( bool  share  )  [inline, virtual]

Copying during cloning.

Implements Gecode::Space.

Definition at line 338 of file graph-color.cc.

virtual void GraphColor::print ( void   )  [inline, virtual]

Print the solution.

Reimplemented from Example.

Definition at line 343 of file graph-color.cc.


Friends And Related Function Documentation

const int g1_e[] [related]

First example graph: edges.

Definition at line 47 of file graph-color.cc.

const int g1_c[] [related]

First example graph: cliques.

Definition at line 99 of file graph-color.cc.

const GraphColorSpec g1(200, g1_e, g1_c) [related]

First example graph.

const int g2_e[] [related]

Second example graph: edges.

Definition at line 173 of file graph-color.cc.

const int g2_c[] [related]

Second example graph: cliques.

Definition at line 209 of file graph-color.cc.

const GraphColorSpec g2(200, g2_e, g2_c) [related]

Second example graph.


The documentation for this class was generated from the following file: