ColPack
|
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 GRAPHCOLORINGINTERFACE_H 00022 #define GRAPHCOLORINGINTERFACE_H 00023 00024 using namespace std; 00025 00026 namespace ColPack 00027 { 00031 class GraphColoringInterface : public GraphColoring 00032 { 00033 public: //DOCUMENTED 00034 00036 00071 GraphColoringInterface(int i_type, ...); 00072 00074 00101 int Coloring(string s_OrderingVariant = "NATURAL", string s_ColoringVariant = "DISTANCE_ONE"); 00102 00104 00127 void GenerateSeedHessian(double*** dp3_seed, int *ip1_SeedRowCount, int *ip1_SeedColumnCount, string s_OrderingVariant="NATURAL", string s_ColoringVariant="STAR"); 00128 00129 00131 00134 void GenerateSeedHessian_unmanaged(double*** dp3_seed, int *ip1_SeedRowCount, int *ip1_SeedColumnCount, string s_OrderingVariant="NATURAL", string s_ColoringVariant="STAR"); 00135 00136 double** GetSeedMatrix(int* ip1_SeedRowCount, int* ip1_SeedColumnCount); 00137 00138 void GetOrderedVertices(vector<int> &output); 00139 00140 int CalculateVertexColorClasses(); 00141 00142 //Public Destructor 1602 00143 ~GraphColoringInterface(); 00144 00145 //Virtual Function 1603 00146 virtual void Clear(); 00147 00148 //Public Function 1604 00149 int DistanceOneColoring(string s_OrderingVariant); 00150 00151 //Public Function 1605 00152 int DistanceTwoColoring(string s_OrderingVariant); 00153 00154 //Public Function 1606 00155 int NaiveStarColoring(string s_OrderingVariant); 00156 00157 //Public Function 1607 00158 int RestrictedStarColoring(string s_OrderingVariant); 00159 00160 //Public Function 1608 00161 int StarColoring(string s_OrderingVariant); 00162 00163 //Public Function 1609 00164 int AcyclicColoring(string s_OrderingVariant); 00165 00166 int AcyclicColoring_ForIndirectRecovery(string s_OrderingVariant); 00167 00168 //Public Function 1610 00169 int TriangularColoring(string s_OrderingVariant); 00170 00171 00172 static void PrintInducedVertexDegrees(int SetID, int i_HighestInducedVertexDegree, vector< list<int> > &vli_GroupedInducedVertexDegrees); 00173 00174 static void PrintVertexEdgeMap(vector<int> &vi_Vertices, vector<int> &vi_Edges , map< int, map< int, int> > &mimi2_VertexEdgeMap); 00175 00176 private: 00177 00178 Timer m_T_Timer; 00179 }; 00180 } 00181 #endif