Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 using namespace std;
00022
00023 #ifndef GRAPHCORE_H
00024 #define GRAPHCORE_H
00025 namespace ColPack
00026 {
00032 class GraphCore
00033 {
00034 public:
00035
00037 void PrintVertexD1Neighbor(int VertexIndex, int excludedVertex = -1);
00038 void GetD1Neighbor(int VertexIndex, vector<int> &D1Neighbor, int excludedVertex = -1);
00039
00041 void PrintVertexD2Neighbor(int VertexIndex);
00042
00044
00050 bool AreD2Neighbor(int VertexIndex1, int VertexIndex2);
00051
00052 bool operator==(const GraphCore &other) const;
00053 bool areEqual(const GraphCore &other, bool structureOnly = 1) const;
00054
00055 protected:
00056
00057 int m_i_MaximumVertexDegree;
00058 int m_i_MinimumVertexDegree;
00059
00060 double m_d_AverageVertexDegree;
00061
00062 string m_s_InputFile;
00063
00064 vector<int> m_vi_Vertices;
00065
00066 vector<int> m_vi_Edges;
00067
00068 vector<double> m_vd_Values;
00069
00074 map< int, map< int, int> > m_mimi2_VertexEdgeMap;
00075
00079 DisjointSets m_ds_DisjointSets;
00080 public:
00081
00082
00083 virtual ~GraphCore() {}
00084
00085
00086 virtual void Initialize() = 0;
00087
00088
00089 virtual void Clear();
00090
00091
00092 int GetVertexCount();
00093
00094
00095
00096 int GetEdgeCount();
00097
00098
00099
00100 int GetMaximumVertexDegree();
00101
00102
00103
00104 int GetMinimumVertexDegree();
00105
00106
00107
00108 double GetAverageVertexDegree();
00109
00110
00111
00112 string GetInputFile();
00113
00114
00115 void GetVertices(vector<int> &output) const;
00116
00117
00118 void GetEdges(vector<int> &output) const;
00119
00120
00121 void GetValues(vector<double> &output) const;
00122
00123 void GetVertexEdgeMap(map< int, map< int, int> > &output);
00124
00125 void GetDisjointSets(DisjointSets &output);
00126
00127
00128 };
00129 }
00130 #endif
00131