ExplicitAdjacency
Declared in astar/structures/ads/ExplicitAdjacency.h; the same class on the site of Doxygen.
-
template<class Cost>
class ExplicitAdjacency 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().
Public Functions
-
inline explicit ExplicitAdjacency(std::size_t n)
constructor of n nodes and no arc
-
inline ExplicitAdjacency(const ExplicitAdjacency &o)
copy constructor: the arcs, to be frozen again
-
inline ExplicitAdjacency &operator=(const ExplicitAdjacency &o)
copy assignment: the arcs, to be frozen again
-
template<class F>
inline void for_each(std::uint32_t u, F &&f) const calls f( v , c ) for each arc ( u , v ) of cost c
-
inline std::size_t size(void) const noexcept
the number of nodes
-
inline explicit ExplicitAdjacency(std::size_t n)