Public Member Functions | Protected Attributes | Private Member Functions

ColPack::GraphOrdering Class Reference
[Classes for Graphs]

class GraphOrdering in group1. More...

#include <GraphOrdering.h>

Inherits ColPack::GraphInputOutput.

Inherited by ColPack::GraphColoring.

Collaboration diagram for ColPack::GraphOrdering:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int GetMaxBackDegree ()
 Calculate and return the Maximum Back degree.
int OrderVertices (string s_OrderingVariant)
 GraphOrdering ()
 ~GraphOrdering ()
virtual void Clear ()
int NaturalOrdering ()
int RandomOrdering ()
int ColoringBasedOrdering (vector< int > &vi_VertexColors)
int LargestFirstOrdering ()
int DistanceTwoLargestFirstOrdering ()
int DynamicLargestFirstOrdering ()
int DistanceTwoDynamicLargestFirstOrdering ()
int SmallestLastOrdering ()
int DistanceTwoSmallestLastOrdering ()
int IncidenceDegreeOrdering ()
int DistanceTwoIncidenceDegreeOrdering ()
string GetVertexOrderingVariant ()
void GetOrderedVertices (vector< int > &output)
void PrintVertexOrdering ()
double GetVertexOrderingTime ()

Protected Attributes

double m_d_OrderingTime
string m_s_VertexOrderingVariant
vector< int > m_vi_OrderedVertices

Private Member Functions

int GetBackDegree (int index)
 Get Back Degree of vertex m_vi_OrderedVertices[index].
int CheckVertexOrdering (string s_VertexOrderingVariant)
int printVertexEdgeMap (vector< vector< pair< int, int > > > &vvpii_VertexEdgeMap)

Detailed Description

class GraphOrdering in group1.

This class stores the ordered vertices as a vector of vertex identifiers to be used by coloring methods.

Definition at line 33 of file GraphOrdering.h.


Constructor & Destructor Documentation

ColPack::GraphOrdering::GraphOrdering (  ) 

Definition at line 103 of file GraphOrdering.cpp.

References Clear().

Here is the call graph for this function:

ColPack::GraphOrdering::~GraphOrdering (  ) 

Definition at line 110 of file GraphOrdering.cpp.

References Clear().

Here is the call graph for this function:


Member Function Documentation

int ColPack::GraphOrdering::CheckVertexOrdering ( string  s_VertexOrderingVariant  )  [private]
void ColPack::GraphOrdering::Clear (  )  [virtual]

Reimplemented from ColPack::GraphInputOutput.

Reimplemented in ColPack::GraphColoring, and ColPack::GraphColoringInterface.

Definition at line 117 of file GraphOrdering.cpp.

References m_d_OrderingTime, m_s_VertexOrderingVariant, and m_vi_OrderedVertices.

Referenced by GraphOrdering(), and ~GraphOrdering().

Here is the caller graph for this function:

int ColPack::GraphOrdering::ColoringBasedOrdering ( vector< int > &  vi_VertexColors  ) 

Definition at line 207 of file GraphOrdering.cpp.

References _TRUE, m_s_VertexOrderingVariant, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, Pause(), STEP_DOWN, and STEP_UP.

Referenced by toFileC_forColoringBasedOrdering().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::DistanceTwoDynamicLargestFirstOrdering (  ) 

Definition at line 796 of file GraphOrdering.cpp.

References _FALSE, _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Here is the call graph for this function:

int ColPack::GraphOrdering::DistanceTwoIncidenceDegreeOrdering (  ) 

Definition at line 1354 of file GraphOrdering.cpp.

References _FALSE, _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::DistanceTwoLargestFirstOrdering (  ) 

Definition at line 570 of file GraphOrdering.cpp.

References _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::DistanceTwoSmallestLastOrdering (  ) 

Definition at line 991 of file GraphOrdering.cpp.

References _FALSE, _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::DynamicLargestFirstOrdering (  ) 

Definition at line 353 of file GraphOrdering.cpp.

References _FALSE, _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::GetBackDegree ( int  index  )  [private]

Get Back Degree of vertex m_vi_OrderedVertices[index].

Precondition: OrderVertices() has been called, i.e. m_vi_OrderedVertices has been populated

Note: This function is written quickly so it is not optimal

int ColPack::GraphOrdering::GetMaxBackDegree (  ) 

Calculate and return the Maximum Back degree.

Precondition: OrderVertices() has been called, i.e. m_vi_OrderedVertices has been populated Note: Back degree of a vertex is the degree of that vertex in the subgraph consisting of vertices that had been ordered (i.e., the vertices that are ordered before the current vertex). Depend on the ordering style, each vertex in vector m_vi_OrderedVertices may have different Back degree. The Maximum Back degree of all vertices in the graph will be returned. This is the UPPER BOUND for the number of colors needed to D1-color the graph.

Definition at line 1585 of file GraphOrdering.cpp.

References ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, and ColPack::GraphCore::m_vi_Vertices.

Referenced by toFileC(), and toFileC_forColoringBasedOrdering().

Here is the caller graph for this function:

void ColPack::GraphOrdering::GetOrderedVertices ( vector< int > &  output  ) 

Reimplemented in ColPack::GraphColoringInterface.

Definition at line 1573 of file GraphOrdering.cpp.

References m_vi_OrderedVertices.

double ColPack::GraphOrdering::GetVertexOrderingTime (  ) 

Definition at line 1580 of file GraphOrdering.cpp.

References m_d_OrderingTime.

Referenced by toFileC(), and toFileC_forColoringBasedOrdering().

Here is the caller graph for this function:

string ColPack::GraphOrdering::GetVertexOrderingVariant (  ) 

Definition at line 1567 of file GraphOrdering.cpp.

References m_s_VertexOrderingVariant.

int ColPack::GraphOrdering::IncidenceDegreeOrdering (  ) 

Definition at line 1194 of file GraphOrdering.cpp.

References _FALSE, _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::LargestFirstOrdering (  ) 

Definition at line 267 of file GraphOrdering.cpp.

References _TRUE, CheckVertexOrdering(), ColPack::GraphCore::m_i_MaximumVertexDegree, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::NaturalOrdering (  ) 

Definition at line 131 of file GraphOrdering.cpp.

References _TRUE, CheckVertexOrdering(), m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, and STEP_DOWN.

Referenced by ColPack::GraphColoring::CheckVertexColoring(), and OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::OrderVertices ( string  s_OrderingVariant  ) 
int ColPack::GraphOrdering::printVertexEdgeMap ( vector< vector< pair< int, int > > > &  vvpii_VertexEdgeMap  )  [private]

Definition at line 319 of file GraphOrdering.cpp.

void ColPack::GraphOrdering::PrintVertexOrdering (  ) 

Definition at line 1619 of file GraphOrdering.cpp.

References m_s_VertexOrderingVariant, and m_vi_OrderedVertices.

int ColPack::GraphOrdering::RandomOrdering (  ) 

Definition at line 156 of file GraphOrdering.cpp.

References _TRUE, CheckVertexOrdering(), m_s_VertexOrderingVariant, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, randomOrdering(), and STEP_DOWN.

Referenced by OrderVertices().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::GraphOrdering::SmallestLastOrdering (  ) 

Definition at line 654 of file GraphOrdering.cpp.

References _FALSE, _TRUE, _UNKNOWN, CheckVertexOrdering(), ColPack::GraphCore::m_vi_Edges, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.

Referenced by OrderVertices(), and ColPack::GraphColoring::TriangularColoring().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation