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

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

#include <lemon/concepts/digraph.h>

Inheritance diagram for Digraph::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 Digraph &, const Node &)
 Sets the iterator to the first outgoing arc.
 OutArcIt (const Digraph &, const Arc &)
 Sets the iterator to the given arc.
OutArcIt & operator++ ()
 Next outgoing arc.
Public Member Functions inherited from Digraph::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.

Detailed Description

This iterator goes trough the outgoing arcs of a certain node of a digraph. Its usage is quite simple, for example, you can count the number of outgoing arcs of a node n in a digraph g of type Digraph 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 Digraph & ,
const Node &  )
inline

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

◆ OutArcIt() [5/5]

OutArcIt ( const Digraph & ,
const Arc &  )
inline

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

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.