ColPack
BipartiteGraphPartialColoring/BipartiteGraphPartialColoring.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 BIPARTITEGRAPHPARTIALCOLORING_H
00024 #define BIPARTITEGRAPHPARTIALCOLORING_H
00025 
00026 namespace ColPack
00027 {
00033         class BipartiteGraphPartialColoring : public BipartiteGraphPartialOrdering
00034         {
00035         public: //DOCUMENTED
00036 
00038                 void PrintPartialColors();
00039 
00041                 void PrintPartialColoringMetrics();
00042 
00044                 int CheckPartialDistanceTwoColoring();
00045 
00047                 void GetVertexPartialColors(vector<int> &output);
00048 
00050                 double** GetSeedMatrix(int* i_SeedRowCount, int* i_SeedColumnCount);
00051 
00053                 double** GetSeedMatrix_unmanaged(int* i_SeedRowCount, int* i_SeedColumnCount);
00054 
00056 
00067                 double** GetLeftSeedMatrix(int* i_SeedRowCount, int* i_SeedColumnCount);
00068 
00070 
00073                 double** GetLeftSeedMatrix_unmanaged(int* i_SeedRowCount, int* i_SeedColumnCount);
00074 
00076 
00087                 double** GetRightSeedMatrix(int* i_SeedRowCount, int* i_SeedColumnCount);
00088 
00090 
00093                 double** GetRightSeedMatrix_unmanaged(int* i_SeedRowCount, int* i_SeedColumnCount);
00094 
00095         private:
00096 
00097                 //Private Function 2401
00098                 int CalculateVertexColorClasses();
00099 
00100                 //Private Function 2402
00101                 int CheckVertexColoring(string s_VertexColoringVariant);
00102 
00103         protected:
00104 
00105                 int m_i_LeftVertexColorCount;
00106                 int m_i_RightVertexColorCount;
00107 
00108                 int m_i_VertexColorCount;
00109 
00110                 int m_i_ViolationCount;
00111 
00112                 int m_i_ColoringUnits;
00113 
00114                 int m_i_LargestLeftVertexColorClass;
00115                 int m_i_LargestRightVertexColorClass;
00116 
00117                 int m_i_LargestLeftVertexColorClassSize;
00118                 int m_i_LargestRightVertexColorClassSize;
00119 
00120                 int m_i_SmallestLeftVertexColorClass;
00121                 int m_i_SmallestRightVertexColorClass;
00122 
00123                 int m_i_SmallestLeftVertexColorClassSize;
00124                 int m_i_SmallestRightVertexColorClassSize;
00125 
00126                 double m_d_AverageLeftVertexColorClassSize;
00127                 double m_d_AverageRightVertexColorClassSize;
00128 
00129                 double m_d_ColoringTime;
00130                 double m_d_CheckingTime;
00131 
00132                 string m_s_VertexColoringVariant;
00133 
00134                 vector<int> m_vi_LeftVertexColors;
00135                 vector<int> m_vi_RightVertexColors;
00136 
00137                 vector<int> m_vi_LeftVertexColorFrequency;
00138                 vector<int> m_vi_RightVertexColorFrequency;
00139 
00140                 bool seed_available;
00141                 int i_seed_rowCount;
00142                 double** dp2_Seed;
00143 
00144                 void Seed_init();
00145                 void Seed_reset();
00146 
00147         public:
00148 
00149                 //Public Constructor 2451
00150                 BipartiteGraphPartialColoring();
00151 
00152                 //Public Destructor 2452
00153                 ~BipartiteGraphPartialColoring();
00154 
00155                 //Virtual Function 2453
00156                 virtual void Clear();
00157 
00158                 //Virtual Function 2454
00159                 virtual void Reset();
00160 
00161                 //Public Function 2455
00162                 int PartialDistanceTwoRowColoring();
00163                 int PartialDistanceTwoRowColoring_serial();
00164                 int PartialDistanceTwoRowColoring_OMP();
00165 
00166                 //Public Function 2456
00167                 int PartialDistanceTwoColumnColoring();
00168                 int PartialDistanceTwoColumnColoring_serial();
00169                 int PartialDistanceTwoColumnColoring_OMP();
00170 
00171                 //Public Function 2457
00172                 int CheckPartialDistanceTwoRowColoring();
00173 
00174                 //Public Function 2458
00175                 int CheckPartialDistanceTwoColumnColoring();
00176 
00177                 //Public Function 2459
00178                 int GetLeftVertexColorCount();
00179 
00180                 //Public Function 2460
00181                 int GetRightVertexColorCount();
00182 
00183                 //Public Function 2461
00184                 int GetVertexColorCount();
00185 
00186                 //Public Function 2462
00187                 string GetVertexColoringVariant();
00188 
00189                 //Public Function 2463
00190                 void GetLeftVertexColors(vector<int> &output);
00191 
00192                 //Public Function 2464
00193                 void GetRightVertexColors(vector<int> &output);
00194 
00195                 //Public Function 2465
00196                 void PrintRowPartialColors();
00197 
00198                 //Public Function 2466
00199                 void PrintColumnPartialColors();
00200 
00201                 //Public Function 2467
00202                 void PrintRowPartialColoringMetrics();
00203 
00204                 //Public Function 2468
00205                 void PrintColumnPartialColoringMetrics();
00206 
00207                 //Public Function 2469
00208                 void PrintVertexPartialColorClasses();
00209                 
00210                 double GetVertexColoringTime();
00211                 
00212                 void SetVertexColoringVariant(string s_VertexColoringVariant);
00213         };
00214 }
00215 #endif
00216 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines