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

GraphColoring/GraphOrdering.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 #ifndef GRAPHORDERING_H
00022 #define GRAPHORDERING_H
00023 
00024 using namespace std;
00025 
00026 namespace ColPack
00027 {
00033         class GraphOrdering : public GraphInputOutput
00034         {
00035         public:
00037 
00045                 int GetMaxBackDegree();
00046 
00047                 int OrderVertices(string s_OrderingVariant);
00048 
00049         private:
00050 
00052 
00057                 int GetBackDegree(int index);
00058 
00059                 //Private Function 1301
00060                 int CheckVertexOrdering(string s_VertexOrderingVariant);
00061 
00062                 int printVertexEdgeMap(vector< vector< pair< int, int> > > &vvpii_VertexEdgeMap);
00063 
00064         protected:
00065 
00066                 double m_d_OrderingTime;
00067 
00068                 string m_s_VertexOrderingVariant;
00069 
00070                 vector<int> m_vi_OrderedVertices; // m_vi_OrderedVertices.size() = m_vi_Vertices.size() - 1
00071 
00072         public:
00073 
00074                 //Public Constructor 1351
00075                 GraphOrdering();
00076 
00077                 //Public Destructor 1352
00078                 ~GraphOrdering();
00079 
00080                 //Virtual Function 1353
00081                 virtual void Clear();
00082 
00083                 //Public Function 1354
00084                 int NaturalOrdering();
00085 
00086                 int RandomOrdering();
00087 
00088                 int ColoringBasedOrdering(vector<int> &vi_VertexColors);
00089 
00090                 //Public Function 1355
00091                 int LargestFirstOrdering();
00092 
00093                 //Public Function 1357
00094                 int DistanceTwoLargestFirstOrdering();
00095 
00096                 //Public Function 1356
00097                 int DynamicLargestFirstOrdering();
00098 
00099                 int DistanceTwoDynamicLargestFirstOrdering();
00100 
00101                 //Public Function 1358
00102                 int SmallestLastOrdering();
00103 
00104                 //Public Function 1359
00105                 int DistanceTwoSmallestLastOrdering();
00106 
00107                 //Public Function 1360
00108                 int IncidenceDegreeOrdering();
00109 
00110                 //Public Function 1361
00111                 int DistanceTwoIncidenceDegreeOrdering();
00112 
00113                 //Public Function 1362
00114                 string GetVertexOrderingVariant();
00115 
00116                 //Public Function 1363
00117                 void GetOrderedVertices(vector<int> &output);
00118 
00119                 void PrintVertexOrdering();
00120 
00121                 //Public Function 1364
00122                 double GetVertexOrderingTime();
00123         };
00124 }
00125 #endif
00126 
00127 

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