Its usage is quite simple, for example you can compute the degree (i.e. count the number of incident arcs 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/graph.h>
Public Member Functions | |
IncEdgeIt () | |
Default constructor. | |
IncEdgeIt (const IncEdgeIt &e) | |
IncEdgeIt (Invalid) | |
IncEdgeIt (const Graph &, const Node &) | |
This constructor sets the iterator to first incident arc. | |
IncEdgeIt (const Graph &, const Edge &) | |
Edge -> IncEdgeIt conversion. | |
IncEdgeIt & | operator++ () |
Next incident arc. |
IncEdgeIt | ( | ) | [inline] |
This constructor set the iterator to the first incident arc of the node.
Sets the iterator to the value of the trivial iterator e
. This feature necessitates that each time we iterate the arc-set, the iteration order is the same.
IncEdgeIt& operator++ | ( | ) | [inline] |
Assign the iterator to the next incident arc of the corresponding node.