All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
Graph::IncEdgeIt Class Reference

Detailed Description

This iterator goes trough the incident edges of a certain node of a graph. You should assume that the loop arcs will be iterated twice.

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>

+ Inheritance diagram for Graph::IncEdgeIt:

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.
 
IncEdgeItoperator++ ()
 Next incident arc.
 
- Public Member Functions inherited from Graph::Edge
 Edge ()
 Default constructor.
 
 Edge (const Edge &)
 
 Edge (Invalid)
 
bool operator== (Edge) const
 Equality operator.
 
bool operator!= (Edge) const
 Inequality operator.
 
bool operator< (Edge) const
 Artificial ordering operator.
 

Constructor & Destructor Documentation

IncEdgeIt ( )
inline
Warning
The default constructor sets the iterator to an undefined value.
IncEdgeIt ( const IncEdgeIt e)
inline

Copy constructor.

IncEdgeIt ( Invalid  )
inline

Initialize the iterator to be invalid.

IncEdgeIt ( const Graph ,
const Node  
)
inline

This constructor set the iterator to the first incident arc of the node.

IncEdgeIt ( const Graph ,
const Edge  
)
inline

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.

Member Function Documentation

IncEdgeIt& operator++ ( )
inline

Assign the iterator to the next incident arc of the corresponding node.