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

Iterator class for the outgoing arcs of a node. More...

#include <lemon/concepts/graph.h>

Inheritance diagram for Graph::OutArcIt:

Public Member Functions

 OutArcIt ()
 Default constructor.
 OutArcIt (const OutArcIt &e)
 Copy constructor.
const OutArcIt & operator= (const OutArcIt &)
 Assignment operator.
 OutArcIt (Invalid)
 Invalid constructor & conversion.
 OutArcIt (const Graph &n, const Node &g)
 Sets the iterator to the first outgoing arc.
 OutArcIt (const Graph &, const Arc &)
 Sets the iterator to the given arc.
OutArcIt & operator++ ()
 Next outgoing 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 trough the outgoing directed 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 a graph g of type Graph as follows.

int count = 0;
for( Digraph::OutArcIt a( g , n ) ; a != INVALID ; ++a )
++count;
Iterator class for the outgoing arcs of a node.
Definition digraph.h:253
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

Constructor & Destructor Documentation

◆ OutArcIt() [1/5]

OutArcIt ( )
inline

Default constructor.

Warning
It sets the iterator to an undefined value.

◆ OutArcIt() [2/5]

OutArcIt ( const OutArcIt & e)
inline

Copy constructor.

◆ OutArcIt() [3/5]

OutArcIt ( Invalid )
inline

Initializes the iterator to be invalid.

See also
Invalid for more details.

◆ OutArcIt() [4/5]

OutArcIt ( const Graph & n,
const Node & g )
inline

Sets the iterator to the first outgoing arc of the given node.

◆ OutArcIt() [5/5]

OutArcIt ( const Graph & ,
const Arc &  )
inline

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

Member Function Documentation

◆ operator=()

const OutArcIt & operator= ( const OutArcIt & )
inline

Assignment operator.

◆ operator++()

OutArcIt & operator++ ( )
inline

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