Edge-list line-reader functor for the graph_reader().Reads an edge (source and target) from the input line (stream). Randomly shuffle the vertex IDs but maintain the right edges. This is useful when a bad locality for the vertices has to be broken EdgeList format: #edge-source #edge-target #weight format: More...
Public Member Functions | |
read_edge_list_line_shuffle (ShuffleMapperView const &mapper) | |
template<typename Aggr , typename Graph > | |
size_t | operator() (std::stringstream &ss, Aggr &aggr, Graph *g) const |
Public Types | |
using | has_edge_property = std::false_type |
Lines do not have properties for edges. | |
Edge-list line-reader functor for the graph_reader().
Reads an edge (source and target) from the input line (stream). Randomly shuffle the vertex IDs but maintain the right edges. This is useful when a bad locality for the vertices has to be broken EdgeList format: #edge-source #edge-target #weight format:
/// #vertices #edges /// source0 target0 /// source1 target1 /// : ///
stapl::read_edge_list_line_shuffle< ShuffleMapperView >::read_edge_list_line_shuffle | ( | ShuffleMapperView const & | mapper | ) |
mapper | A view over a stapl container which gives a one to one mapping from one vertex id to a new id. No 2 ids must map to the same new id |
size_t stapl::read_edge_list_line_shuffle< ShuffleMapperView >::operator() | ( | std::stringstream & | ss, |
Aggr & | aggr, | ||
Graph * | g | ||
) | const |
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.) |