Dimacs line-reader for the graph_reader().Reads an edge (source and target) from the input line (stream). format:
More...
|
template<typename Aggr , typename Graph > |
size_t | operator() (std::stringstream &ss, Aggr &aggr, Graph *g) const |
|
Dimacs line-reader for the graph_reader().
Reads an edge (source and target) from the input line (stream). format:
/// c comments
/// p sp #vertices #edges
/// a source0 target0
/// a source1 target1
/// :
///
- Note
- Vertex id's in Dimacs files start with 1 (not zero).
◆ operator()()
template<typename Aggr , typename Graph >
size_t stapl::read_dimacs_line::operator() |
( |
std::stringstream & |
ss, |
|
|
Aggr & |
aggr, |
|
|
Graph * |
g |
|
) |
| const |
- Parameters
-
ss | The stringstream representing a line from the input file. |
aggr | The edge-aggregator to output the read edges to. |
g | A pointer to the output graph. The edges may be added to the graph, or additional operations performed (i.e., setting properties for vertices and edges, etc.) |
- Returns
- '0' for success, '1' for failure.
The documentation for this struct was generated from the following file: