ColPack
ColPack::GraphCore Class Reference

class GraphCore in group1. More...

#include <GraphCore.h>

Inheritance diagram for ColPack::GraphCore:
Collaboration diagram for ColPack::GraphCore:

List of all members.

Public Member Functions

void PrintVertexD1Neighbor (int VertexIndex, int excludedVertex=-1)
 Print all the Distance-1 neighbors of VertexIndex (0-based), except the excludedVertex.
void GetD1Neighbor (int VertexIndex, vector< int > &D1Neighbor, int excludedVertex=-1)
void PrintVertexD2Neighbor (int VertexIndex)
 Print all the Distance-2 neighbors of VertexIndex.
bool AreD2Neighbor (int VertexIndex1, int VertexIndex2)
 Check and see if VertexIndex1 and VertexIndex2 are Distance-2 neighbor.
bool operator== (const GraphCore &other) const
bool areEqual (const GraphCore &other, bool structureOnly=1) const
virtual ~GraphCore ()
virtual void Clear ()
int GetVertexCount ()
int GetEdgeCount ()
int GetMaximumVertexDegree ()
int GetMinimumVertexDegree ()
double GetAverageVertexDegree ()
string GetInputFile ()
void GetVertices (vector< int > &output) const
vector< int > * GetVerticesPtr ()
void GetEdges (vector< int > &output) const
vector< int > * GetEdgesPtr ()
void GetValues (vector< double > &output) const
void GetVertexEdgeMap (map< int, map< int, int > > &output)
void GetDisjointSets (DisjointSets &output)

Protected Attributes

int m_i_MaximumVertexDegree
int m_i_MinimumVertexDegree
double m_d_AverageVertexDegree
string m_s_InputFile
vector< int > m_vi_Vertices
vector< int > m_vi_Edges
vector< double > m_vd_Values
 Edge's weight.
map< int, map< int, int > > m_mimi2_VertexEdgeMap
DisjointSets m_ds_DisjointSets

Detailed Description

class GraphCore in group1.

Base class for Graph. Define a Graph: vertices, edges and values (edge's weight - optional); and its statisitcs: max, min and average degree.

Definition at line 32 of file GraphCore.h.


Constructor & Destructor Documentation

virtual ColPack::GraphCore::~GraphCore ( ) [inline, virtual]

Definition at line 82 of file GraphCore.h.


Member Function Documentation

bool ColPack::GraphCore::AreD2Neighbor ( int  VertexIndex1,
int  VertexIndex2 
)

Check and see if VertexIndex1 and VertexIndex2 are Distance-2 neighbor.

Algorithm:

  • Get the set D1_of_VertexIndex1 of all the Distance-1 neighbors of VertexIndex1
  • Get the set D1_of_VertexIndex2 of all the Distance-1 neighbors of VertexIndex2
  • Intersect D1_of_VertexIndex1 and D1_of_VertexIndex2 to see which vertices VertexIndex1 and VertexIndex2 have in common. The result is stored in Intersect_set
  • If the size of Intersect_set > 0 => VertexIndex1 and VertexIndex2 are Distance-2 neighbor

Definition at line 174 of file GraphCore.cpp.

References STEP_UP.

bool ColPack::GraphCore::areEqual ( const GraphCore other,
bool  structureOnly = 1 
) const

Definition at line 240 of file GraphCore.cpp.

References GetEdges(), GetValues(), and GetVertices().

Here is the call graph for this function:

Definition at line 75 of file GraphCore.cpp.

Referenced by toFileC(), toFileC_forColoringBasedOrdering(), and toFileStatisticForGraph().

Here is the caller graph for this function:

void ColPack::GraphCore::GetD1Neighbor ( int  VertexIndex,
vector< int > &  D1Neighbor,
int  excludedVertex = -1 
)

Definition at line 124 of file GraphCore.cpp.

References STEP_UP.

Definition at line 54 of file GraphCore.cpp.

Referenced by toFileC(), toFileC_forColoringBasedOrdering(), and toFileStatisticForGraph().

Here is the caller graph for this function:

vector<int>* ColPack::GraphCore::GetEdgesPtr ( ) [inline]

Definition at line 102 of file GraphCore.h.

Reimplemented in ColPack::GraphInputOutput.

Definition at line 82 of file GraphCore.cpp.

Definition at line 68 of file GraphCore.cpp.

Referenced by toFileC(), toFileC_forColoringBasedOrdering(), and toFileStatisticForGraph().

Here is the caller graph for this function:

void ColPack::GraphCore::GetValues ( vector< double > &  output) const

Definition at line 102 of file GraphCore.cpp.

Referenced by areEqual(), and operator==().

Here is the caller graph for this function:

vector<int>* ColPack::GraphCore::GetVerticesPtr ( ) [inline]

Definition at line 99 of file GraphCore.h.

bool ColPack::GraphCore::operator== ( const GraphCore other) const

Definition at line 211 of file GraphCore.cpp.

References GetEdges(), GetValues(), and GetVertices().

Here is the call graph for this function:

void ColPack::GraphCore::PrintVertexD1Neighbor ( int  VertexIndex,
int  excludedVertex = -1 
)

Print all the Distance-1 neighbors of VertexIndex (0-based), except the excludedVertex.

Print all the Distance-1 neighbors of VertexIndex, except the excludedVertex.

Definition at line 141 of file GraphCore.cpp.

References STEP_UP.

void ColPack::GraphCore::PrintVertexD2Neighbor ( int  VertexIndex)

Print all the Distance-2 neighbors of VertexIndex.

Definition at line 159 of file GraphCore.cpp.

References STEP_UP.


Member Data Documentation

Definition at line 60 of file GraphCore.h.

Definition at line 58 of file GraphCore.h.

map< int, map< int, int> > ColPack::GraphCore::m_mimi2_VertexEdgeMap [protected]

m_mimi2_VertexEdgeMap is a matrix that has all the non-zero (edge) in the upper triangle marked from 0 to (total number of non-zeros - 1) Populated by GraphColoring::AcyclicColoring()

Definition at line 74 of file GraphCore.h.

Referenced by ColPack::GraphColoring::AcyclicColoring(), and ColPack::GraphColoring::AcyclicColoring_ForIndirectRecovery().

vector<double> ColPack::GraphCore::m_vd_Values [protected]

Edge's weight.

Definition at line 68 of file GraphCore.h.

vector<int> ColPack::GraphCore::m_vi_Edges [protected]

Definition at line 66 of file GraphCore.h.

Referenced by ColPack::GraphColoring::AcyclicColoring(), ColPack::GraphColoring::AcyclicColoring_ForIndirectRecovery(), ColPack::GraphColoring::BuildColorsSubGraph(), ColPack::GraphColoring::BuildConnectedSubGraph(), ColPack::GraphColoring::BuildForbiddenColors(), ColPack::GraphColoring::BuildStarCollection(), ColPack::GraphColoring::BuildSubGraph(), ColPack::GraphColoring::CheckDistanceTwoColoring(), ColPack::GraphColoring::CheckQuickDistanceTwoColoring(), ColPack::GraphColoring::CheckStarColoring(), ColPack::GraphColoring::CheckStarColoring_OMP(), ColPack::GraphColoring::DistanceOneColoring(), ColPack::GraphColoring::DistanceTwoColoring(), ColPack::GraphOrdering::DistanceTwoDynamicLargestFirstOrdering(), ColPack::GraphOrdering::DistanceTwoIncidenceDegreeOrdering(), ColPack::GraphOrdering::DistanceTwoLargestFirstOrdering(), ColPack::GraphOrdering::DistanceTwoSmallestLastOrdering(), ColPack::GraphOrdering::DynamicLargestFirstOrdering(), ColPack::GraphColoring::FileVertexColoringMetrics(), ColPack::GraphColoring::FindDistance(), ColPack::GraphOrdering::GetMaxBackDegree(), ColPack::GraphColoring::GetStarColoringConflicts(), ColPack::GraphOrdering::IncidenceDegreeOrdering(), ColPack::GraphColoring::ModifiedTriangularColoring(), ColPack::GraphColoring::NaiveStarColoring(), ColPack::GraphColoring::PrintStarCollection(), ColPack::GraphColoring::PrintVertexColoringMetrics(), ColPack::GraphColoring::PrintVertexD1NeighborAndColor(), ColPack::GraphColoring::RestrictedStarColoring(), ColPack::GraphOrdering::SmallestLastOrdering_serial(), ColPack::GraphColoring::StarColoring(), ColPack::GraphColoring::StarColoring_serial(), ColPack::GraphColoring::StarColoring_serial2(), and ColPack::GraphColoring::TriangularColoring().

vector<int> ColPack::GraphCore::m_vi_Vertices [protected]

Definition at line 64 of file GraphCore.h.

Referenced by ColPack::GraphColoring::AcyclicColoring(), ColPack::GraphColoring::AcyclicColoring_ForIndirectRecovery(), ColPack::GraphColoring::BuildColorsSubGraph(), ColPack::GraphColoring::BuildConnectedSubGraph(), ColPack::GraphColoring::BuildForbiddenColors(), ColPack::GraphColoring::BuildStarCollection(), ColPack::GraphColoring::BuildStarFromColorCombination(), ColPack::GraphColoring::BuildSubGraph(), ColPack::GraphColoring::BuildVertex2ColorCombination(), ColPack::GraphColoring::CheckAcyclicColoring(), ColPack::GraphColoring::CheckDistanceTwoColoring(), ColPack::GraphColoring::CheckQuickDistanceTwoColoring(), ColPack::GraphColoring::CheckStarColoring(), ColPack::GraphColoring::CheckStarColoring_OMP(), ColPack::GraphOrdering::ColoringBasedOrdering(), ColPack::GraphColoring::DetectConflictInColorCombination(), ColPack::GraphColoring::DistanceOneColoring(), ColPack::GraphColoring::DistanceTwoColoring(), ColPack::GraphOrdering::DistanceTwoDynamicLargestFirstOrdering(), ColPack::GraphOrdering::DistanceTwoIncidenceDegreeOrdering(), ColPack::GraphOrdering::DistanceTwoLargestFirstOrdering(), ColPack::GraphOrdering::DistanceTwoSmallestLastOrdering(), ColPack::GraphOrdering::DynamicLargestFirstOrdering(), ColPack::GraphColoring::FileVertexColoringMetrics(), ColPack::GraphColoring::FindDistance(), ColPack::GraphOrdering::GetMaxBackDegree(), ColPack::GraphColoring::GetStarColoringConflicts(), ColPack::GraphOrdering::IncidenceDegreeOrdering(), ColPack::GraphOrdering::LargestFirstOrdering(), ColPack::GraphColoring::ModifiedTriangularColoring(), ColPack::GraphColoring::NaiveStarColoring(), ColPack::GraphOrdering::NaturalOrdering(), ColPack::GraphColoring::PrintStarCollection(), ColPack::GraphColoring::PrintVertex2ColorCombination(), ColPack::GraphColoring::PrintVertexColoringMetrics(), ColPack::GraphColoring::PrintVertexD1NeighborAndColor(), ColPack::GraphOrdering::RandomOrdering(), ColPack::GraphColoring::RestrictedStarColoring(), ColPack::GraphOrdering::SmallestLastOrdering_serial(), ColPack::GraphColoring::StarColoring(), ColPack::GraphColoring::StarColoring_serial(), ColPack::GraphColoring::StarColoring_serial2(), and ColPack::GraphColoring::TriangularColoring().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines