ColPack
|
class BipartiteGraphInputOutput in group2. More...
#include <BipartiteGraphInputOutput.h>
Public Member Functions | |
int | BuildBPGraphFromADICFormat (std::list< std::set< int > > *lsi_SparsityPattern, int i_ColumnCount) |
int | BuildBPGraphFromCSRFormat (int *ip_RowIndex, int i_RowCount, int i_ColumnCount, int *ip_ColumnIndex) |
Read the sparsity pattern of Jacobian matrix represented in zero-based indexing, 3-array variation CSR format and build a corresponding adjacency graph. | |
int | BuildBPGraphFromRowCompressedFormat (unsigned int **uip2_JacobianSparsityPattern, int i_RowCount, int i_ColumnCount) |
Read the sparsity pattern of Jacobian matrix represented in ADOLC format (Row Compressed format) and build a corresponding adjacency graph. | |
int | RowCompressedFormat2BipartiteGraph (unsigned int **uip2_JacobianSparsityPattern, int i_RowCount, int i_ColumnCount) |
Given a compressed sparse row representation, build the corresponding bipartite graph representation. | |
int | ReadBipartiteGraph (string s_InputFile, string s_fileFormat="AUTO_DETECTED") |
Read the sparsity pattern of a matrix in the specified file format from the specified filename and build a Bipartite Graph. | |
int | ReadGenericMatrixBipartiteGraph (string s_InputFile) |
Read a file with explicit 1 and 0 representing sparsity structure and build corresponding bipartite graph. | |
int | ReadGenericSquareMatrixBipartiteGraph (string s_InputFile) |
Read a file with explicit 1 and 0 representing sparsity sturcture of a square matrix whose order is specified in the extension of the filename and build a Bipartite Graph. | |
int | ReadHarwellBoeingBipartiteGraph (string s_InputFile) |
Read sparsity pattern of a matrix specified in Harwell Boeing format from a file and build a corresponding bipartite graph. | |
int | ReadMatrixMarketBipartiteGraph (string s_InputFile) |
Read sparsity pattern of a matrix specified in Matrix Market format from a file and build a corresponding bipartite graph. | |
int | ReadMeTiSBipartiteGraph (string s_InputFile) |
Read sparsity pattern of a matrix specified in MeTiS format from a file and build a corresponding bipartite graph. | |
void | PrintBipartiteGraph () |
void | PrintVertexDegrees () |
int | BipartiteGraph2RowCompressedFormat (unsigned int ***uip3_JacobianSparsityPattern, unsigned int *uip1_RowCount, unsigned int *uip1_ColumnCount) |
Given a bipartite graph representation, build the corresponding compressed sparse row representation. | |
int | WriteMatrixMarket (string s_OutputFile="-ColPack_debug.mtx") |
Write the structure of the bipartite graph into a file using Matrix Market format. | |
BipartiteGraphInputOutput () | |
~BipartiteGraphInputOutput () | |
virtual void | Clear () |
Private Member Functions | |
void | CalculateVertexDegrees () |
class BipartiteGraphInputOutput in group2.
BipartiteGraphInputOutput class provides the input methods for reading in matrix or graph files in supported formats for generating bipartite graphs. Three input formats are supported by default - Matrix Market, Harwell Boeing and MeTiS. This class is similar to the GraphInputOutput class discussed in Section 2.1 in functionalities with the difference that it stores bipartite graphs in CES scheme.
Definition at line 36 of file BipartiteGraphInputOutput.h.
Definition at line 90 of file BipartiteGraphInputOutput.cpp.
Definition at line 96 of file BipartiteGraphInputOutput.cpp.
int ColPack::BipartiteGraphInputOutput::BipartiteGraph2RowCompressedFormat | ( | unsigned int *** | uip3_JacobianSparsityPattern, |
unsigned int * | uip1_RowCount, | ||
unsigned int * | uip1_ColumnCount | ||
) |
Given a bipartite graph representation, build the corresponding compressed sparse row representation.
Postcondition:
Return value:
Definition at line 1068 of file BipartiteGraphInputOutput.cpp.
References _TRUE.
int ColPack::BipartiteGraphInputOutput::BuildBPGraphFromADICFormat | ( | std::list< std::set< int > > * | lsi_SparsityPattern, |
int | i_ColumnCount | ||
) |
Definition at line 973 of file BipartiteGraphInputOutput.cpp.
References _TRUE.
int ColPack::BipartiteGraphInputOutput::BuildBPGraphFromCSRFormat | ( | int * | ip_RowIndex, |
int | i_RowCount, | ||
int | i_ColumnCount, | ||
int * | ip_ColumnIndex | ||
) |
Read the sparsity pattern of Jacobian matrix represented in zero-based indexing, 3-array variation CSR format and build a corresponding adjacency graph.
Zero-based indexing, 3-array variation CSR format: http://software.intel.com/sites/products/documentation/hpc/mkl/webhelp/appendices/mkl_appA_SMSF.html#table_79228E147DA0413086BEFF4EFA0D3F04
Return value:
Definition at line 924 of file BipartiteGraphInputOutput.cpp.
References _TRUE.
int ColPack::BipartiteGraphInputOutput::BuildBPGraphFromRowCompressedFormat | ( | unsigned int ** | uip2_JacobianSparsityPattern, |
int | i_RowCount, | ||
int | i_ColumnCount | ||
) |
Read the sparsity pattern of Jacobian matrix represented in ADOLC format (Row Compressed format) and build a corresponding adjacency graph.
Equivalent to RowCompressedFormat2BipartiteGraph Precondition:
Return value:
Definition at line 1022 of file BipartiteGraphInputOutput.cpp.
void ColPack::BipartiteGraphInputOutput::CalculateVertexDegrees | ( | ) | [private] |
Definition at line 28 of file BipartiteGraphInputOutput.cpp.
void ColPack::BipartiteGraphInputOutput::Clear | ( | ) | [virtual] |
Reimplemented from ColPack::BipartiteGraphCore.
Reimplemented in ColPack::BipartiteGraphBicoloring, ColPack::BipartiteGraphBicoloringInterface, ColPack::BipartiteGraphPartialColoringInterface, ColPack::BipartiteGraphPartialColoring, ColPack::BipartiteGraphVertexCover, ColPack::BipartiteGraphOrdering, and ColPack::BipartiteGraphPartialOrdering.
Definition at line 102 of file BipartiteGraphInputOutput.cpp.
Definition at line 905 of file BipartiteGraphInputOutput.cpp.
int ColPack::BipartiteGraphInputOutput::ReadBipartiteGraph | ( | string | s_InputFile, |
string | s_fileFormat = "AUTO_DETECTED" |
||
) |
Read the sparsity pattern of a matrix in the specified file format from the specified filename and build a Bipartite Graph.
This function will
About input parameters:
Definition at line 1096 of file BipartiteGraphInputOutput.cpp.
References _TRUE, ColPack::File::GetFileExtension(), ColPack::isHarwellBoeingFormat(), ColPack::isMatrixMarketFormat(), and ColPack::isMeTiSFormat().
int ColPack::BipartiteGraphInputOutput::ReadGenericMatrixBipartiteGraph | ( | string | s_InputFile | ) |
Read a file with explicit 1 and 0 representing sparsity structure and build corresponding bipartite graph.
The format of the matrix is specified bellow (this file format .gen is NOT the same as the .gen2 files used by ReadGenericSquareMatrixBipartiteGraph() ):
Example: testmatrix-5by5.gen
1 1 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 1 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 1 1 0 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 1 1 0
0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 1
0 1 0 1 0 1 0 1 0 1
Definition at line 619 of file BipartiteGraphInputOutput.cpp.
int ColPack::BipartiteGraphInputOutput::ReadGenericSquareMatrixBipartiteGraph | ( | string | s_InputFile | ) |
Read a file with explicit 1 and 0 representing sparsity sturcture of a square matrix whose order is specified in the extension of the filename and build a Bipartite Graph.
The format of the matrix is specified bellow (this file format .gen2 is NOT the same as the .gen files used by ReadGenericMatrixBipartiteGraph() ):
Example: testmatrix-12by10.gens (because the min is 10 => real size: 10x10)
11101010100101010101101110101001010101011010111010
01010101011010101110010101010110101010110101010101
Definition at line 725 of file BipartiteGraphInputOutput.cpp.
int ColPack::BipartiteGraphInputOutput::ReadHarwellBoeingBipartiteGraph | ( | string | s_InputFile | ) |
Read sparsity pattern of a matrix specified in Harwell Boeing format from a file and build a corresponding bipartite graph.
Supported sub-format: MXTYPE[3] = (R | P) (*) (A)
Definition at line 488 of file BipartiteGraphInputOutput.cpp.
int ColPack::BipartiteGraphInputOutput::ReadMatrixMarketBipartiteGraph | ( | string | s_InputFile | ) |
Read sparsity pattern of a matrix specified in Matrix Market format from a file and build a corresponding bipartite graph.
Definition at line 133 of file BipartiteGraphInputOutput.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(), mm_typecode_to_str(), STEP_DOWN, and STEP_UP.
int ColPack::BipartiteGraphInputOutput::ReadMeTiSBipartiteGraph | ( | string | s_InputFile | ) |
Read sparsity pattern of a matrix specified in MeTiS format from a file and build a corresponding bipartite graph.
Definition at line 404 of file BipartiteGraphInputOutput.cpp.
int ColPack::BipartiteGraphInputOutput::RowCompressedFormat2BipartiteGraph | ( | unsigned int ** | uip2_JacobianSparsityPattern, |
int | i_RowCount, | ||
int | i_ColumnCount | ||
) |
Given a compressed sparse row representation, build the corresponding bipartite graph representation.
Precondition:
Return value:
Definition at line 1026 of file BipartiteGraphInputOutput.cpp.
References _TRUE.
int ColPack::BipartiteGraphInputOutput::WriteMatrixMarket | ( | string | s_OutputFile = "-ColPack_debug.mtx" | ) |
Write the structure of the bipartite graph into a file using Matrix Market format.
Definition at line 109 of file BipartiteGraphInputOutput.cpp.