LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::adjacencyGraph< N, W, D, F, E >::edge_iterator Class Reference

The edge iterator iterates on all outgoing edges of a node. More...

#include <ltiAdjacencyGraph.h>

List of all members.

Public Member Functions

 edge_iterator ()
 edge_iterator (const edge_iterator &other)
edge_iteratoroperator++ ()
edge_iterator operator++ (int)
edge_iteratoroperator-- ()
edge_iterator operator-- (int)
bool operator== (const edge_iterator &other) const
bool operator!= (const edge_iterator &other) const
edge_data_typeoperator* ()
const edge_data_typeoperator* () const
edge_iteratoroperator= (const edge_iterator &other)

Protected Member Functions

 edge_iterator (const typename row_type::iterator &startPos, const id_type node)
const row_type::iterator & getPos () const
entry_typegetRWEntry () const
const entry_typegetEntry () const
id_type getNode () const

Detailed Description

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
class lti::adjacencyGraph< N, W, D, F, E >::edge_iterator

The edge iterator iterates on all outgoing edges of a node.

This class is similar to the usual iterators of the STL. The iterator allows you to access the data the edge, but you can also get the next node's id for other kind of processing.

Since you got this iterator, you should know somehow which is the starting edge node.

To access the edge's data, use the operator* (for example, if it is an edge_iterator, get the data with (*it) ). To get the ids of the nodes or the weight of the edge, use the corresponding methods in the adjacencyGraph class.


Constructor & Destructor Documentation

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::edge_iterator (  )  [inline]

Default constructor.

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::edge_iterator ( const edge_iterator other  )  [inline]

copy constructor

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::edge_iterator ( const typename row_type::iterator &  startPos,
const id_type  node 
) [inline, explicit, protected]

protected constructor (for internal use only)

Parameters:
startPos map iterator
node id of the current node

Member Function Documentation

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
const entry_type& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::getEntry (  )  const [inline, protected]

get complete matrix element entry for internal use only!!!

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
id_type lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::getNode (  )  const [inline, protected]
template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
const row_type::iterator& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::getPos (  )  const [inline, protected]
template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
entry_type& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::getRWEntry (  )  const [inline, protected]

get complete matrix element entry for internal use only!!!

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
bool lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator!= ( const edge_iterator other  )  const [inline]

compare if both pointed positions are different

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
const edge_data_type& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator* (  )  const [inline]

get pointed data

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
edge_data_type& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator* (  )  [inline]

get pointed data

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
edge_iterator lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator++ ( int   )  [inline]

advance to next item

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
edge_iterator& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator++ (  )  [inline]

advance to next item

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
edge_iterator lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator-- ( int   )  [inline]

recede to previous item

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
edge_iterator& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator-- (  )  [inline]

recede to previous item // prefix

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
edge_iterator& lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator= ( const edge_iterator other  )  [inline]

copy member

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
bool lti::adjacencyGraph< N, W, D, F, E >::edge_iterator::operator== ( const edge_iterator other  )  const [inline]

compare if both pointed positions are the same


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

Generated on Sat Apr 10 15:28:09 2010 for LTI-Lib by Doxygen 1.6.1