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

Detailed Description

This iterator goes trough the incoming arcs of a certain node of a graph. Its usage is quite simple, for example you can count the number of outgoing arcs of a node n in graph g of type Graph as follows.

int count=0;
for(Graph::InArcIt e(g, n); e!=INVALID; ++e) ++count;

#include <lemon/concepts/graph.h>

+ Inheritance diagram for Graph::InArcIt:

Public Member Functions

 InArcIt ()
 Default constructor.
 
 InArcIt (const InArcIt &e)
 
 InArcIt (Invalid)
 
 InArcIt (const Graph &g, const Node &n)
 This constructor sets the iterator to first incoming arc.
 
 InArcIt (const Graph &, const Arc &)
 Arc -> InArcIt conversion.
 
InArcItoperator++ ()
 Next incoming arc.
 
- Public Member Functions inherited from Graph::Arc
 Arc ()
 Default constructor.
 
 Arc (const Arc &)
 
 Arc (Invalid)
 
bool operator== (Arc) const
 Equality operator.
 
bool operator!= (Arc) const
 Inequality operator.
 
bool operator< (Arc) const
 Artificial ordering operator.
 
 operator Edge () const
 Converison to Edge.
 

Constructor & Destructor Documentation

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

Copy constructor.

InArcIt ( Invalid  )
inline

Initialize the iterator to be invalid.

InArcIt ( const Graph g,
const Node n 
)
inline

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

Parameters
nthe node
gthe graph
InArcIt ( const Graph ,
const Arc  
)
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

InArcIt& operator++ ( )
inline

Assign the iterator to the next inarc of the corresponding node.