Its usage is quite simple, for example you can compute the degree (i.e. count the number of incident edges of a node n
in graph g
of type Graph
as follows.
int count=0; for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
#include <lemon/concepts/ugraph.h>
Public Member Functions | |
IncEdgeIt () | |
Default constructor. | |
IncEdgeIt (const IncEdgeIt &e) | |
IncEdgeIt (Invalid) | |
IncEdgeIt (const UGraph &, const Node &) | |
This constructor sets the iterator to first incident edge. | |
IncEdgeIt (const UGraph &, const UEdge &) | |
UEdge -> IncEdgeIt conversion. | |
IncEdgeIt & | operator++ () |
Next incident edge. |
IncEdgeIt | ( | ) | [inline] |
This constructor set the iterator to the first incident edge of the node.
Sets the iterator to the value of the trivial iterator e
. This feature necessitates that each time we iterate the edge-set, the iteration order is the same.
IncEdgeIt& operator++ | ( | ) | [inline] |
Assign the iterator to the next incident edge of the corresponding node.