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

Detailed Description

This iterator goes through each arc of a graph. Its usage is quite simple, for example you can count the number of arcs in a graph g of type Graph as follows:

int count=0;
for(Graph::ArcIt e(g); e!=INVALID; ++e) ++count;

#include <lemon/concepts/graph.h>

+ Inheritance diagram for Graph::ArcIt:

Public Member Functions

 ArcIt ()
 Default constructor.
 
 ArcIt (const ArcIt &e)
 
 ArcIt (Invalid)
 
 ArcIt (const Graph &g)
 This constructor sets the iterator to the first arc.
 
 ArcIt (const Graph &, const Arc &)
 Arc -> ArcIt conversion.
 
ArcItoperator++ ()
 Next 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

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

Copy constructor.

ArcIt ( Invalid  )
inline

Initialize the iterator to be invalid.

ArcIt ( const Graph g)
inline

This constructor sets the iterator to the first arc of g.

Parameters
gthe graph
ArcIt ( 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

ArcIt& operator++ ( )
inline

Assign the iterator to the next arc.