ColPack
BipartiteGraphBicoloring/BipartiteGraphCore.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 BIPARTITEGRAPHCORE_H
00024 #define BIPARTITEGRAPHCORE_H
00025 
00026 namespace ColPack
00027 {
00033         class BipartiteGraphCore
00034         {
00035         public: //DOCUMENTED
00036 
00038                 int GetRowVertexCount();
00040                 int GetLeftVertexCount();
00041 
00042                 
00044                 int GetColumnVertexCount();
00046                 int GetRightVertexCount();
00047 
00048                 bool operator==(const BipartiteGraphCore &other) const;
00049 
00050         protected:
00051 
00052                 int m_i_MaximumLeftVertexDegree;
00053                 int m_i_MaximumRightVertexDegree;
00054                 int m_i_MaximumVertexDegree;
00055 
00056                 int m_i_MinimumLeftVertexDegree;
00057                 int m_i_MinimumRightVertexDegree;
00058                 int m_i_MinimumVertexDegree;
00059 
00060                 double m_d_AverageLeftVertexDegree;
00061                 double m_d_AverageRightVertexDegree;
00062                 double m_d_AverageVertexDegree;
00063 
00064                 string m_s_InputFile;
00065 
00066                 vector<int> m_vi_LeftVertices;
00067                 vector<int> m_vi_RightVertices;
00068 
00069                 vector<int> m_vi_Edges;
00070 
00071                 map< int, map<int, int> > m_mimi2_VertexEdgeMap;
00072                 
00073 
00074         public:
00075                 
00076                 virtual ~BipartiteGraphCore(){}
00077 
00078                 virtual void Clear();
00079                 
00080                 string GetInputFile();
00081                 
00082                 vector<int>* GetLeftVerticesPtr() ;
00083                 vector<int>* GetRightVerticesPtr() ;
00084 
00085                 void GetRowVertices(vector<int> &output) const;
00086                 void GetLeftVertices(vector<int> &output) const;
00087                 
00088                 void GetColumnVertices(vector<int> &output) const;
00089                 void GetRightVertices(vector<int> &output) const;
00090 
00091                 unsigned int GetRowVertices(unsigned int** ip2_RowVertex);
00092                 unsigned int GetColumnIndices(unsigned int** ip2_ColumnIndex);
00093 
00094                 void GetEdges(vector<int> &output) const;
00095                 
00096                 void GetVertexEdgeMap(map< int, map<int, int> > &output);
00097 
00098                 int GetEdgeCount();
00099 
00100                 int GetMaximumRowVertexDegree();
00101 
00102                 int GetMaximumColumnVertexDegree();
00103 
00104                 int GetMaximumVertexDegree();
00105 
00106                 int GetMinimumRowVertexDegree();
00107 
00108                 int GetMinimumColumnVertexDegree();
00109 
00110                 int GetMinimumVertexDegree();
00111 
00112                 double GetAverageRowVertexDegree();
00113                 
00114                 double GetAverageColumnVertexDegree();
00115                 
00116                 double GetAverageVertexDegree();
00117         };
00118 }
00119 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines