It is not possible to find all parallel edges between two nodes. Use AllEdgeLookUp for this purpose.
G | The type of the underlying graph. |
#include <lemon/graph_utils.h>
Public Member Functions | |
EdgeLookUp (const Graph &g) | |
Constructor. | |
void | refresh (Node n) |
Refresh the data structure at a node. | |
void | refresh () |
Refresh the full data structure. | |
Edge | operator() (Node s, Node t) const |
Find an edge between two nodes. |
EdgeLookUp | ( | const Graph & | g | ) | [inline] |
Constructor.
It builds up the search database, which remains valid until the graph changes.
void refresh | ( | Node | n | ) | [inline] |
Build up the search database of node n
.
It runs in time O(dlogd), where d is the number of the outgoing edges of n
.
Reimplemented in AllEdgeLookUp< G >.
void refresh | ( | ) | [inline] |
Build up the full search database. In fact, it simply calls refresh(n) for each node n
.
It runs in time O(mlogD), where m is the number of the edges of n
and D is the maximum out-degree of the graph.
Reimplemented in AllEdgeLookUp< G >.
Edge operator() | ( | Node | s, | |
Node | t | |||
) | const [inline] |
Find an edge between two nodes in time O(logd), where d is the number of outgoing edges of s
.
s | The source node | |
t | The target node |
s
to t
if there exists, INVALID otherwise.n
, then refresh(n) is enough.