Loading...
Searching...
No Matches
IterableGraphComponent< BAS > Class Template Reference

## Detailed Description

template<typename BAS = BaseGraphComponent>
class lemon::concepts::IterableGraphComponent< BAS >

This class describes the interface of iterable undirected graphs. It extends IterableDigraphComponent with the core iterable interface of undirected graphs. This concept is part of the Graph concept.

`#include <lemon/concepts/graph_components.h>`

Inheritance diagram for IterableGraphComponent< BAS >:
[legend]

## Class Based Iteration

This interface provides iterator classes for edges.
typedef GraphItemIt< Graph, Edge > | EdgeIt
| This iterator goes through each edge.
typedef GraphIncIt< Graph, Edge, Node, 'e'> | IncEdgeIt
| This iterator goes trough the incident edges of a node.
Node | baseNode (const IncEdgeIt &) const
| The base node of the iterator.
Node | runningNode (const IncEdgeIt &) const
| The running node of the iterator.

## Public Member Functions

Base Iteration
This interface provides functions for iteration on edges.
void | first (Edge &) const
| Return the first edge.
void | next (Edge &) const
| Return the next edge.
void | firstInc (Edge &, bool &, const Node &) const
| Return the first edge incident to the given node.
void | nextInc (Edge &, bool &) const
| Gives back the next of the edges from the given node.
Public Member Functions inherited from IterableDigraphComponent< BaseGraphComponent >
void | first (Node &) const
| Return the first node.
void | next (Node &) const
| Return the next node.
void | firstIn (Arc &, const Node &) const
| Return the first arc incoming to the given node.
void | nextIn (Arc &) const
| Return the next arc incoming to the given node.
void | firstOut (Arc &, const Node &) const
| Return the first arc outgoing form the given node.
void | nextOut (Arc &) const
| Return the next arc outgoing form the given node.
Node | baseNode (const InArcIt &) const
| The base node of the iterator.
Node | runningNode (const InArcIt &) const
| The running node of the iterator.
Public Member Functions inherited from BaseGraphComponent
Node | u (const Edge &) const
| Return one end node of an edge.
Node | v (const Edge &) const
| Return the other end node of an edge.
Arc | direct (const Edge &, bool) const
| Return a directed arc related to an edge.
Arc | direct (const Edge &, const Node &) const
| Return a directed arc related to an edge.
bool | direction (const Arc &) const
| Return the direction of the arc.
Arc | oppositeArc (const Arc &) const
| Return the opposite arc.
Public Member Functions inherited from BaseDigraphComponent
Node | source (const Arc &) const
| Return the source node of an arc.
Node | target (const Arc &) const
| Return the target node of an arc.
Node | oppositeNode (const Node &, const Arc &) const
| Return the opposite node on the given arc.

## Additional Inherited Members

typedef GraphItemIt< Digraph, Node > | NodeIt
| This iterator goes through each node.
typedef GraphItemIt< Digraph, Arc > | ArcIt
| This iterator goes through each arc.
typedef GraphIncIt< Digraph, Arc, Node, 'i'> | InArcIt
| This iterator goes trough the incoming arcs of a node.
typedef GraphIncIt< Digraph, Arc, Node, 'o'> | OutArcIt
| This iterator goes trough the outgoing arcs of a node.
Public Types inherited from BaseDigraphComponent
typedef GraphItem< 'n'> | Node
| Node class of the digraph.
typedef GraphItem< 'a'> | Arc
| Arc class of the digraph.

## Member Typedef Documentation

## EdgeIt

template<typename BAS = BaseGraphComponent>

typedef GraphItemIt<Graph, Edge> EdgeIt

This iterator goes through each edge.

## IncEdgeIt

template<typename BAS = BaseGraphComponent>

typedef GraphIncIt<Graph, Edge, Node, 'e'> IncEdgeIt

This iterator goes trough the incident edges of a certain node of a graph.

## Member Function Documentation

## first()

template<typename BAS = BaseGraphComponent>

void first | ( | Edge & |  | ) | const

inline

This function gives back the first edge in the iteration order.

## next()

template<typename BAS = BaseGraphComponent>

void next | ( | Edge & |  | ) | const

inline

This function gives back the next edge in the iteration order.

## firstInc()

template<typename BAS = BaseGraphComponent>

void firstInc | ( | Edge & | ,
|  | bool & | ,
|  | const Node & | ) const

inline

This function gives back the first edge incident to the given node. The bool parameter gives back the direction for which the source node of the directed arc representing the edge is the given node.

## nextInc()

template<typename BAS = BaseGraphComponent>

void nextInc | ( | Edge & | ,
|  | bool & | ) const

inline

This function gives back the next edge incident to the given node. The bool parameter should be used as `firstInc()` use it.

## baseNode()

template<typename BAS = BaseGraphComponent>

Node baseNode | ( | const IncEdgeIt & |  | ) | const

inline

This function gives back the base node of the iterator.

## runningNode()

template<typename BAS = BaseGraphComponent>

Node runningNode | ( | const IncEdgeIt & |  | ) | const

inline

This function gives back the running node of the iterator.