[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| AdjacencyListGraph Class Reference Graph Data Structures and Algorithms |

undirected adjacency list graph in the LEMON API More...

`#include <vigra/adjacency_list_graph.hxx>`

## Classes

struct | ArcMap
| default arc map More...
struct | EdgeMap
| default edge map More...
struct | NodeMap
| default node map More...

## Public Types

typedef detail::GenericArc< index_type > | Arc
| arc descriptor
typedef detail_adjacency_list_graph::ArcIt< GraphType > | ArcIt
| arc iterator
typedef detail::GenericEdge< index_type > | Edge
| edge descriptor
typedef detail_adjacency_list_graph::ItemIter< GraphType, Edge > | EdgeIt
| edge iterator
typedef detail::GenericIncEdgeIt< GraphType, NodeStorage, InFlter > | InArcIt
| incoming arc iterator
typedef detail::GenericIncEdgeIt< GraphType, NodeStorage, IncFilter > | IncEdgeIt
| incident edge iterator
typedef detail::GenericNode< index_type > | Node
| node descriptor
typedef detail_adjacency_list_graph::ItemIter< GraphType, Node > | NodeIt
| node iterator
typedef detail::GenericIncEdgeIt< GraphType, NodeStorage, OutFilter > | OutArcIt
| outgoing arc iterator
typedef detail::GenericIncEdgeIt< GraphType, NodeStorage, BackOutFilter > | OutBackArcIt
| outgoing back arc iterator

## Public Member Functions

| AdjacencyListGraph (const size_t nodes=0, const size_t edges=0)
| Constructor. More...
Arc | arcFromId (const index_type id) const
| Get arc descriptor for given node ID i (API: LEMON). Return `Arc(lemon::INVALID)` when the ID does not exist in this graph.
index_type | arcNum () const
| Get the number of arcs in this graph (API: LEMON).
Node | baseNode (const IncEdgeIt &iter) const
| Return the start node of the edge the given iterator is referring to (API: LEMON).
Node | baseNode (const OutArcIt &iter) const
| Return the start node of the edge the given iterator is referring to (API: LEMON).
Arc | direct (const Edge &edge, const bool forward) const
| Create an arc for the given edge e, oriented along the edge's natural (`forward = true`) or reversed (`forward = false`) direction (API: LEMON).
Arc | direct (const Edge &edge, const Node &node) const
| Create an arc for the given edge e oriented so that node n is the starting node of the arc (API: LEMON), or return `lemon::INVALID` if the edge is not incident to this node.
bool | direction (const Arc &arc) const
| Return `true` when the arc is looking on the underlying edge in its natural (i.e. forward) direction, `false` otherwise (API: LEMON).
Edge | edgeFromId (const index_type id) const
| Get edge descriptor for given node ID i (API: LEMON). Return `Edge(lemon::INVALID)` when the ID does not exist in this graph.
index_type | edgeNum () const
| Get the number of edges in this graph (API: LEMON).
Arc | findArc (const Node &u, const Node &v) const
| Get a descriptor for the arc connecting vertices u and v, or `lemon::INVALID` if no such edge exists (API: LEMON).
Edge | findEdge (const Node &a, const Node &b) const
| Get a descriptor for the edge connecting vertices u and v, or `lemon::INVALID` if no such edge exists (API: LEMON).
index_type | id (const Node &node) const
| Get the ID for node desciptor v (API: LEMON).
index_type | id (const Edge &edge) const
| Get the ID for edge desciptor v (API: LEMON).
index_type | id (const Arc &arc) const
| Get the ID for arc desciptor v (API: LEMON).
index_type | maxArcId () const
| Get the maximum ID of any edge in arc graph (API: LEMON).
index_type | maxEdgeId () const
| Get the maximum ID of any edge in this graph (API: LEMON).
index_type | maxNodeId () const
| Get the maximum ID of any node in this graph (API: LEMON).
Node | nodeFromId (const index_type id) const
| Get node descriptor for given node ID i (API: LEMON). Return `Node(lemon::INVALID)` when the ID does not exist in this graph.
index_type | nodeNum () const
| Get the number of nodes in this graph (API: LEMON).
Node | oppositeNode (Node const &n, const Edge &e) const
| Return the opposite node of the given node n along edge e (API: LEMON), or return `lemon::INVALID` if the edge is not incident to this node.
Node | runningNode (const IncEdgeIt &iter) const
| Return the end node of the edge the given iterator is referring to (API: LEMON).
Node | runningNode (const OutArcIt &iter) const
| Return the end node of the edge the given iterator is referring to (API: LEMON).
Node | source (const Arc &arc) const
| Get the start node of the given arc a (API: LEMON).
Node | target (const Arc &arc) const
| Get the end node of the given arc a (API: LEMON).
Node | u (const Edge &edge) const
| Get the start node of the given edge e (API: LEMON, the boost::graph API provides the free function `boost::source(e, graph)`).
Node | v (const Edge &edge) const
| Get the end node of the given edge e (API: LEMON, the boost::graph API provides the free function `boost::target(e, graph)`).

## Detailed Description

undirected adjacency list graph in the LEMON API

## Constructor & Destructor Documentation

## ◆ AdjacencyListGraph()

AdjacencyListGraph | ( | const size_t | nodes = `0`,
|  | const size_t | edges = `0`
| ) |  |

Constructor.

Parameters

  nodes | : reserve space for so many nodes
  edges | : reserve space for so many edges

The documentation for this class was generated from the following file:

- vigra/adjacency_list_graph.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.0