• Main Page
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

GraphColoring/GraphCore.h

Go to the documentation of this file.
00001 /************************************************************************************
00002     Copyright (C) 2005-2008 Assefaw H. Gebremedhin, Arijit Tarafdar, Duc Nguyen,
00003     Alex Pothen
00004 
00005     This file is part of ColPack.
00006 
00007     ColPack is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU Lesser General Public License as published
00009     by the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     ColPack is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public License
00018     along with ColPack.  If not, see <http://www.gnu.org/licenses/>.
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: //DOCUMENTED
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; //moved from int GraphColoring::AcyclicColoring()
00075 
00079                 DisjointSets m_ds_DisjointSets; //moved from int GraphColoring::AcyclicColoring()
00080         public:
00081 
00082                 //Virtual Destructor 1100
00083                 virtual ~GraphCore() {}
00084 
00085                 //Virtual Function 1101
00086                 virtual void Initialize() = 0;
00087 
00088                 //Virtual Function 1102
00089                 virtual void Clear();
00090 
00091                 //Public Function 1103
00092                 int GetVertexCount();
00093 
00094 
00095                 //Public Function 1104
00096                 int GetEdgeCount();
00097 
00098 
00099                 //Public Function 1105
00100                 int GetMaximumVertexDegree();
00101 
00102 
00103                 //Public Function 1106
00104                 int GetMinimumVertexDegree();
00105 
00106 
00107                 //Public Function 1107
00108                 double GetAverageVertexDegree();
00109 
00110 
00111                 //Public Function 1108
00112                 string GetInputFile();
00113 
00114                 //Public Function 1109
00115                 void GetVertices(vector<int> &output) const;
00116 
00117                 //Public Function 1110
00118                 void GetEdges(vector<int> &output) const;
00119 
00120                 //Public Function 1111
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 

Generated on Tue Sep 7 2010 15:28:11 for ColPack by  doxygen 1.7.1