|
| | ExplicitAdjacency (std::size_t n) |
| | constructor of n nodes and no arc
|
| | ExplicitAdjacency (const ExplicitAdjacency &o) |
| | copy constructor: the arcs, to be frozen again
|
| ExplicitAdjacency & | operator= (const ExplicitAdjacency &o) |
| | copy assignment: the arcs, to be frozen again
|
| void | add (std::uint32_t u, std::uint32_t v, Cost c) |
| | adds the arc ( u , v ) of cost c
|
| template<class F> |
| void | for_each (std::uint32_t u, F &&f) const |
| | calls f( v , c ) for each arc ( u , v ) of cost c
|
| std::size_t | size (void) const noexcept |
| | the number of nodes
|
template<class Cost>
class PBeFS_di_unipi_it::ExplicitAdjacency< Cost >
the arcs of a weighted graph, on the GraphBuilder and ArrayGraph of ADS
The interface is that of the ExplicitAdjacency of ExplicitGraph.h. The arcs are collected by the GraphBuilder; the first for_each() after an add() freezes them into an ArrayGraph, in compressed rows that keep the order of insertion, under a lock taken only then, so that the searches of many threads may start together. A loop ( u , u ) is not kept, as the GraphBuilder wants two distinct nodes and a loop never shortens a path. An add() must not run with a for_each().