ColPack
|
class GraphOrdering in group1. More...
#include <GraphOrdering.h>
Public Member Functions | |
int | GetMaxBackDegree () |
Calculate and return the Maximum Back degree. | |
int | OrderVertices (string s_OrderingVariant) |
int | CheckVertexOrdering () |
Test and make sure that the ordering is valid. Return 0 if the ordering is invalid, 1 if the ordering is valid. | |
GraphOrdering () | |
~GraphOrdering () | |
virtual void | Clear () |
void | ClearOrderingONLY () |
int | NaturalOrdering () |
int | RandomOrdering () |
int | ColoringBasedOrdering (vector< int > &vi_VertexColors) |
int | LargestFirstOrdering () |
int | DistanceTwoLargestFirstOrdering () |
int | DynamicLargestFirstOrdering () |
int | DistanceTwoDynamicLargestFirstOrdering () |
int | SmallestLastOrdering () |
int | SmallestLastOrdering_serial () |
int | DistanceTwoSmallestLastOrdering () |
int | IncidenceDegreeOrdering () |
int | DistanceTwoIncidenceDegreeOrdering () |
string | GetVertexOrderingVariant () |
void | GetOrderedVertices (vector< int > &output) |
vector< int > * | GetOrderedVerticesPtr () |
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) |
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.
Definition at line 113 of file GraphOrdering.cpp.
References Clear().
Definition at line 120 of file GraphOrdering.cpp.
References Clear().
Test and make sure that the ordering is valid. Return 0 if the ordering is invalid, 1 if the ordering is valid.
This routine will test for:
Actually make a call to "bool isValidOrdering(vector<int> & ordering, int offset = 0);"
Definition at line 92 of file GraphOrdering.cpp.
References isValidOrdering().
Referenced by DistanceTwoDynamicLargestFirstOrdering(), DistanceTwoIncidenceDegreeOrdering(), DistanceTwoLargestFirstOrdering(), DistanceTwoSmallestLastOrdering(), DynamicLargestFirstOrdering(), IncidenceDegreeOrdering(), LargestFirstOrdering(), NaturalOrdering(), RandomOrdering(), and SmallestLastOrdering_serial().
int ColPack::GraphOrdering::CheckVertexOrdering | ( | string | s_VertexOrderingVariant | ) | [private] |
Definition at line 97 of file GraphOrdering.cpp.
void ColPack::GraphOrdering::Clear | ( | ) | [virtual] |
Reimplemented from ColPack::GraphInputOutput.
Reimplemented in ColPack::GraphColoring, and ColPack::GraphColoringInterface.
Definition at line 127 of file GraphOrdering.cpp.
References _UNKNOWN, m_d_OrderingTime, m_s_VertexOrderingVariant, and m_vi_OrderedVertices.
Referenced by GraphOrdering(), and ~GraphOrdering().
Definition at line 139 of file GraphOrdering.cpp.
References _UNKNOWN, m_d_OrderingTime, m_s_VertexOrderingVariant, and m_vi_OrderedVertices.
int ColPack::GraphOrdering::ColoringBasedOrdering | ( | vector< int > & | vi_VertexColors | ) |
Definition at line 227 of file GraphOrdering.cpp.
References _FALSE, _TRUE, m_s_VertexOrderingVariant, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, Pause(), STEP_DOWN, and STEP_UP.
Referenced by toFileC_forColoringBasedOrdering().
Definition at line 820 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.
Definition at line 1378 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.
Definition at line 590 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.
Definition at line 1015 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.
Definition at line 373 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.
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
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 1609 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().
void ColPack::GraphOrdering::GetOrderedVertices | ( | vector< int > & | output | ) |
Reimplemented in ColPack::GraphColoringInterface.
Definition at line 1597 of file GraphOrdering.cpp.
References m_vi_OrderedVertices.
vector<int>* ColPack::GraphOrdering::GetOrderedVerticesPtr | ( | ) | [inline] |
Definition at line 129 of file GraphOrdering.h.
Definition at line 1604 of file GraphOrdering.cpp.
References m_d_OrderingTime.
Referenced by toFileC(), and toFileC_forColoringBasedOrdering().
Definition at line 1591 of file GraphOrdering.cpp.
References m_s_VertexOrderingVariant.
Definition at line 1218 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.
Definition at line 287 of file GraphOrdering.cpp.
References _FALSE, _TRUE, CheckVertexOrdering(), ColPack::GraphCore::m_i_MaximumVertexDegree, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, STEP_DOWN, and STEP_UP.
Definition at line 151 of file GraphOrdering.cpp.
References _TRUE, CheckVertexOrdering(), m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, and STEP_DOWN.
int ColPack::GraphOrdering::OrderVertices | ( | string | s_OrderingVariant | ) |
Definition at line 28 of file GraphOrdering.cpp.
References _TRUE, and toUpper().
int ColPack::GraphOrdering::printVertexEdgeMap | ( | vector< vector< pair< int, int > > > & | vvpii_VertexEdgeMap | ) | [private] |
Definition at line 339 of file GraphOrdering.cpp.
References _TRUE.
Definition at line 1643 of file GraphOrdering.cpp.
References m_s_VertexOrderingVariant, and m_vi_OrderedVertices.
Definition at line 176 of file GraphOrdering.cpp.
References _TRUE, CheckVertexOrdering(), m_s_VertexOrderingVariant, m_vi_OrderedVertices, ColPack::GraphCore::m_vi_Vertices, randomOrdering(), and STEP_DOWN.
Definition at line 672 of file GraphOrdering.cpp.
References SmallestLastOrdering_serial().
Referenced by ColPack::GraphColoring::TriangularColoring().
Definition at line 678 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 SmallestLastOrdering().
double ColPack::GraphOrdering::m_d_OrderingTime [protected] |
Definition at line 75 of file GraphOrdering.h.
Referenced by Clear(), ClearOrderingONLY(), ColPack::GraphColoring::FileVertexColoringMetrics(), ColPack::GraphColoring::FileVertexColors(), GetVertexOrderingTime(), ColPack::GraphColoring::PrintVertexColoringMetrics(), and ColPack::GraphColoring::PrintVertexColors().
string ColPack::GraphOrdering::m_s_VertexOrderingVariant [protected] |
Definition at line 77 of file GraphOrdering.h.
Referenced by Clear(), ClearOrderingONLY(), ColoringBasedOrdering(), ColPack::GraphColoring::FileVertexColoringMetrics(), ColPack::GraphColoring::FileVertexColors(), GetVertexOrderingVariant(), ColPack::GraphColoring::PrintVertexColorClasses(), ColPack::GraphColoring::PrintVertexColoringMetrics(), ColPack::GraphColoring::PrintVertexColors(), PrintVertexOrdering(), and RandomOrdering().
vector<int> ColPack::GraphOrdering::m_vi_OrderedVertices [protected] |
Definition at line 79 of file GraphOrdering.h.
Referenced by ColPack::GraphColoring::AcyclicColoring(), ColPack::GraphColoring::AcyclicColoring_ForIndirectRecovery(), Clear(), ClearOrderingONLY(), ColoringBasedOrdering(), ColPack::GraphColoring::DistanceOneColoring(), ColPack::GraphColoring::DistanceTwoColoring(), DistanceTwoDynamicLargestFirstOrdering(), DistanceTwoIncidenceDegreeOrdering(), DistanceTwoLargestFirstOrdering(), DistanceTwoSmallestLastOrdering(), DynamicLargestFirstOrdering(), GetMaxBackDegree(), GetOrderedVertices(), IncidenceDegreeOrdering(), LargestFirstOrdering(), ColPack::GraphColoring::ModifiedTriangularColoring(), ColPack::GraphColoring::NaiveStarColoring(), NaturalOrdering(), PrintVertexOrdering(), RandomOrdering(), ColPack::GraphColoring::RestrictedStarColoring(), SmallestLastOrdering_serial(), ColPack::GraphColoring::StarColoring(), ColPack::GraphColoring::StarColoring_serial(), ColPack::GraphColoring::StarColoring_serial2(), and ColPack::GraphColoring::TriangularColoring().