abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
Graph::ArcIt Class Reference

Iterator class for the arcs. More...

#include <lemon/concepts/graph.h>

Inheritance diagram for Graph::ArcIt:

Public Member Functions

 ArcIt ()
 Default constructor.
 ArcIt (const ArcIt &e)
 Copy constructor.
const ArcIt & operator= (const ArcIt &)
 Assignment operator.
 ArcIt (Invalid)
 Invalid constructor & conversion.
 ArcIt (const Graph &g)
 Sets the iterator to the first arc.
 ArcIt (const Graph &, const Arc &)
 Sets the iterator to the given arc.
ArcIt & operator++ ()
 Next arc.
Public Member Functions inherited from Graph::Arc
 Arc ()
 Default constructor.
 Arc (const Arc &)
 Copy constructor.
const Arc & operator= (const Arc &)
 Assignment operator.
 Arc (Invalid)
 Invalid constructor & conversion.
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.

Detailed Description

This iterator goes through each directed arc of the 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 a( g ) ; a != INVALID ; ++a )
++count;
Iterator class for the arcs.
Definition graph.h:490
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

Constructor & Destructor Documentation

◆ ArcIt() [1/5]

ArcIt ( )
inline

Default constructor.

Warning
It sets the iterator to an undefined value.

◆ ArcIt() [2/5]

ArcIt ( const ArcIt & e)
inline

Copy constructor.

◆ ArcIt() [3/5]

ArcIt ( Invalid )
inline

Initializes the iterator to be invalid.

See also
Invalid for more details.

◆ ArcIt() [4/5]

ArcIt ( const Graph & g)
inlineexplicit

Sets the iterator to the first arc of the given graph.

◆ ArcIt() [5/5]

ArcIt ( const Graph & ,
const Arc &  )
inline

Sets the iterator to the given arc of the given graph.

Member Function Documentation

◆ operator=()

const ArcIt & operator= ( const ArcIt & )
inline

Assignment operator.

◆ operator++()

ArcIt & operator++ ( )
inline

Assign the iterator to the next arc.