Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GRAPHINPUTOUTPUT_H
00022 #define GRAPHINPUTOUTPUT_H
00023
00024 using namespace std;
00025
00026 namespace ColPack
00027 {
00035 class GraphInputOutput : public GraphCore
00036 {
00037 public:
00038
00040
00060 int ReadAdjacencyGraph(string s_InputFile, string s_fileFormat="AUTO_DETECTED");
00061
00063
00070 int BuildGraphFromRowCompressedFormat(unsigned int ** uip2_HessianSparsityPattern, int i_RowCount);
00071
00074
00081 int ReadMatrixMarketAdjacencyGraph(string s_InputFile, bool b_getStructureOnly = false);
00082
00083 private:
00084
00085
00086 int ParseWidth(string FortranFormat);
00087
00088
00089 void CalculateVertexDegrees();
00090
00091 public:
00092
00093
00094 GraphInputOutput();
00095
00096
00097 ~GraphInputOutput();
00098
00099
00100
00101 virtual void Initialize();
00102
00103
00104 virtual void Clear();
00105
00106
00107 string GetInputFile();
00108
00109
00110
00111
00112
00113
00114
00116 int ReadHarwellBoeingAdjacencyGraph(string s_InputFile);
00117
00118
00120 int ReadMeTiSAdjacencyGraph(string s_InputFile);
00121 int ReadMeTiSAdjacencyGraph2(string s_InputFile);
00122
00123
00124 int PrintGraph();
00125
00126
00127 int PrintGraphStructure();
00128
00129
00130 int PrintMatrix();
00131
00132
00133 int PrintMatrix(vector<int> &, vector<int> &, vector<double> &);
00134
00135
00136 void PrintVertexDegrees();
00137 };
00138 }
00139 #endif
00140