This can be used to view a directed graph (that supports reverse arcs) from graph.h as un undirected graph: operator[](node) returns a pseudo-container that iterates over all nodes adjacent to "node" (from outgoing or incoming arcs). More...
#include <util.h>
Classes | |
| class | AdjacencyListIterator |
Public Types | |
| typedef Graph::OutgoingOrOppositeIncomingArcIterator | ArcIterator |
Public Member Functions | |
| UndirectedAdjacencyListsOfDirectedGraph (const Graph &graph) | |
| BeginEndWrapper< AdjacencyListIterator > | operator[] (int node) const |
| Returns a pseudo-container of all the nodes adjacent to "node". More... | |
This can be used to view a directed graph (that supports reverse arcs) from graph.h as un undirected graph: operator[](node) returns a pseudo-container that iterates over all nodes adjacent to "node" (from outgoing or incoming arcs).
CAVEAT: Self-arcs (aka loops) will appear twice.
Example: ReverseArcsStaticGraph<> dgraph; ... UndirectedAdjacencyListsOfDirectedGraph<decltype(dgraph)> ugraph(dgraph); for (int neighbor_of_node_42 : ugraph[42]) { ... }
| typedef Graph::OutgoingOrOppositeIncomingArcIterator util::UndirectedAdjacencyListsOfDirectedGraph< Graph >::ArcIterator |
|
inlineexplicit |
|
inline |