ColPack
|
class GraphInputOutput in group1. More...
#include <GraphInputOutput.h>
Public Member Functions | |
int | BuildGraphFromRowCompressedFormat (unsigned int **uip2_HessianSparsityPattern, int i_RowCount) |
Read the sparsity pattern of Hessian matrix represented in ADOLC format (Compressed Sparse Row format) and build a corresponding adjacency graph. | |
int | ReadAdjacencyGraph (string s_InputFile, string s_fileFormat="AUTO_DETECTED") |
Read the sparsity pattern of a symmetric matrix in the specified file format from the specified filename and build an adjacency graph. | |
int | ReadMatrixMarketAdjacencyGraph (string s_InputFile, bool b_getStructureOnly=false) |
Read the entries of a symmetric matrix in Matrix Market format and build the corresponding adjacency graph. | |
int | WriteMatrixMarket (string s_OutputFile="-ColPack_debug.mtx", bool b_getStructureOnly=false) |
Write the structure of the graph into a file using Matrix Market format. | |
GraphInputOutput () | |
~GraphInputOutput () | |
virtual void | Clear () |
string | GetInputFile () |
int | ReadHarwellBoeingAdjacencyGraph (string s_InputFile) |
Read the entries of symmetric matrix in Harwell Boeing format and build the corresponding adjacency graph. | |
int | ReadMeTiSAdjacencyGraph (string s_InputFile) |
Read the entries of symmetric matrix in MeTiS format and build the corresponding adjacency graph. | |
int | ReadMeTiSAdjacencyGraph2 (string s_InputFile) |
int | PrintGraph () |
int | PrintGraphStructure () |
int | PrintGraphStructure2 () |
int | PrintMatrix () |
int | PrintMatrix (vector< int > &, vector< int > &, vector< double > &) |
void | PrintVertexDegrees () |
Private Member Functions | |
int | ParseWidth (string FortranFormat) |
void | CalculateVertexDegrees () |
class GraphInputOutput in group1.
This class provides the input methods for reading in matrix or graph files in supported formats for generating general graphs. Three input formats are supported by default - Matrix Market, Harwell Boeing and MeTiS.
Definition at line 35 of file GraphInputOutput.h.
Definition at line 105 of file GraphInputOutput.cpp.
Definition at line 114 of file GraphInputOutput.cpp.
int ColPack::GraphInputOutput::BuildGraphFromRowCompressedFormat | ( | unsigned int ** | uip2_HessianSparsityPattern, |
int | i_RowCount | ||
) |
Read the sparsity pattern of Hessian matrix represented in ADOLC format (Compressed Sparse Row format) and build a corresponding adjacency graph.
Precondition:
Return value:
Definition at line 1241 of file GraphInputOutput.cpp.
void ColPack::GraphInputOutput::CalculateVertexDegrees | ( | ) | [private] |
Definition at line 73 of file GraphInputOutput.cpp.
void ColPack::GraphInputOutput::Clear | ( | ) | [virtual] |
Reimplemented from ColPack::GraphCore.
Reimplemented in ColPack::GraphColoring, ColPack::GraphColoringInterface, and ColPack::GraphOrdering.
Definition at line 120 of file GraphInputOutput.cpp.
string ColPack::GraphInputOutput::GetInputFile | ( | ) |
Reimplemented from ColPack::GraphCore.
Definition at line 128 of file GraphInputOutput.cpp.
int ColPack::GraphInputOutput::ParseWidth | ( | string | FortranFormat | ) | [private] |
Definition at line 28 of file GraphInputOutput.cpp.
Definition at line 1145 of file GraphInputOutput.cpp.
Definition at line 1177 of file GraphInputOutput.cpp.
int ColPack::GraphInputOutput::PrintMatrix | ( | vector< int > & | vi_Vertices, |
vector< int > & | vi_Edges, | ||
vector< double > & | vd_Values | ||
) |
Definition at line 1204 of file GraphInputOutput.cpp.
Definition at line 1230 of file GraphInputOutput.cpp.
int ColPack::GraphInputOutput::ReadAdjacencyGraph | ( | string | s_InputFile, |
string | s_fileFormat = "AUTO_DETECTED" |
||
) |
Read the sparsity pattern of a symmetric matrix in the specified file format from the specified filename and build an adjacency graph.
This function will
About input parameters:
Definition at line 1363 of file GraphInputOutput.cpp.
References _TRUE, ColPack::File::GetFileExtension(), ColPack::isHarwellBoeingFormat(), ColPack::isMatrixMarketFormat(), and ColPack::isMeTiSFormat().
int ColPack::GraphInputOutput::ReadHarwellBoeingAdjacencyGraph | ( | string | s_InputFile | ) |
Read the entries of symmetric matrix in Harwell Boeing format and build the corresponding adjacency graph.
Supported sub-format: MXTYPE[3] = (R | P) (S | U) (A) If MXTYPE[2] = 'U', the matrix structure must still be symmetric for ColPack to work correctly
Definition at line 365 of file GraphInputOutput.cpp.
References _FALSE, _UNKNOWN, ConvertHarwellBoeingDouble(), and Pause().
int ColPack::GraphInputOutput::ReadMatrixMarketAdjacencyGraph | ( | string | s_InputFile, |
bool | b_getStructureOnly = false |
||
) |
Read the entries of a symmetric matrix in Matrix Market format and build the corresponding adjacency graph.
Precondition:
Definition at line 175 of file GraphInputOutput.cpp.
References _FALSE, _TRUE, ColPack::f(), mm_is_coordinate, mm_is_general, mm_is_integer, mm_is_pattern, mm_is_real, mm_is_symmetric, mm_read_banner(), and mm_typecode_to_str().
int ColPack::GraphInputOutput::ReadMeTiSAdjacencyGraph | ( | string | s_InputFile | ) |
int ColPack::GraphInputOutput::ReadMeTiSAdjacencyGraph2 | ( | string | s_InputFile | ) |
Definition at line 786 of file GraphInputOutput.cpp.
References _FALSE, _TRUE, ColPack::StringTokenizer::GetNextToken(), ColPack::StringTokenizer::HasMoreTokens(), STEP_DOWN, and STEP_UP.
int ColPack::GraphInputOutput::WriteMatrixMarket | ( | string | s_OutputFile = "-ColPack_debug.mtx" , |
bool | b_getStructureOnly = false |
||
) |
Write the structure of the graph into a file using Matrix Market format.
NOTES:
Definition at line 133 of file GraphInputOutput.cpp.