Teuchos - Trilinos Tools Package
Version of the Day
|
Stores one entry of a sparse graph. More...
#include <Teuchos_MatrixMarket_Raw_Graph_Adder.hpp>
Public Member Functions | |
GraphElement () | |
Default constructor: an invalid entry of the graph. More... | |
GraphElement (const Ordinal i, const Ordinal j) | |
Create a sparse graph entry at (i,j). More... | |
bool | operator== (const GraphElement &rhs) |
Compare row and column indices. More... | |
bool | operator!= (const GraphElement &rhs) |
Compare row and column indices. More... | |
bool | operator< (const GraphElement &rhs) const |
Lexicographic order first by row index, then by column index. More... | |
Ordinal | rowIndex () const |
Row index (zero-based) of this GraphElement. More... | |
Ordinal | colIndex () const |
Column index (zero-based) of this GraphElement. More... | |
Stores one entry of a sparse graph.
Ordinal | The type of indices of the sparse graph. |
This class is mainly useful as an implementation detail of GraphAdder. We expose it to users only if they wish to convert the sparse graph read in by GraphAdder into a storage format other than CSR (compressed sparse row).
An array of Elements implements the so-called "array of structs" representation of a coordinate format sparse graph. A GraphElement has a row and column index (each of type Ordinal). Elements also have equality and ordering comparisons. The equality comparison only tests the row and column index, and is intended to simplify merging matrix entries with the same row and column indices. The ordering comparison means that std::sort of a sequence of Elements will put them in an order suitable for extracting the CSR (compressed sparse row) representation of the sparse graph.
Definition at line 86 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Default constructor: an invalid entry of the graph.
Definition at line 89 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Create a sparse graph entry at (i,j).
Definition at line 95 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Compare row and column indices.
Definition at line 99 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Compare row and column indices.
Definition at line 104 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Lexicographic order first by row index, then by column index.
Definition at line 109 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Row index (zero-based) of this GraphElement.
Definition at line 120 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.
|
inline |
Column index (zero-based) of this GraphElement.
Definition at line 123 of file Teuchos_MatrixMarket_Raw_Graph_Adder.hpp.