LTI-Lib latest version v1.9 - last update 24 Nov 2005
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

The graph iterator iterates on all nodes. More...

#include <ltiAdjacencyGraph.h>

List of all members.

Public Member Functions

 iterator ()
 iterator (const iterator &other)
iteratoroperator++ ()
iterator operator++ (int)
iteratoroperator-- ()
iterator operator-- (int)
bool operator== (const iterator &other) const
bool operator!= (const iterator &other) const
node_typeoperator * ()
id_type id () const
iteratoroperator= (const iterator &other)

Protected Member Functions

 iterator (const int startPos, nodes_type *vct)
const int & getPos () const
const nodes_typegetVector () 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 >::iterator

The graph iterator iterates on all nodes.

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

For example:

 adjacencyGraph::iterator it;
 // ... do something with a graph an let the iterator point somewhere 
 //     therein.
 adjacencyGraphNode node = (*it); // get the pointed data.
 adjacencyGraph::id_type = it.id(); // get the id of the pointed node.


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 >::iterator::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 >::iterator::iterator const 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 >::iterator::iterator const int  startPos,
nodes_type vct
[inline, explicit, protected]
 

protected constructor (for internal use only)


Member Function Documentation

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

for internal use only!!!

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
const nodes_type* lti::adjacencyGraph< N, W, D, F, E >::iterator::getVector  )  const [inline, protected]
 

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 >::iterator::id  )  const [inline]
 

get pointed node's id.

Please note that the id can become invalid if the pointed node is removed.

template<class N, class W = float, class D = int, class F = adjacencyGraphVoidWeightFunction<N,W,D>, class E = symmetricEdgeTraits<W>>
node_type& lti::adjacencyGraph< N, W, D, F, E >::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>>
bool lti::adjacencyGraph< N, W, D, F, E >::iterator::operator!= const 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>>
iterator lti::adjacencyGraph< N, W, D, F, E >::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>>
iterator& lti::adjacencyGraph< N, W, D, F, E >::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>>
iterator lti::adjacencyGraph< N, W, D, F, E >::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>>
iterator& lti::adjacencyGraph< N, W, D, F, E >::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>>
iterator& lti::adjacencyGraph< N, W, D, F, E >::iterator::operator= const 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 >::iterator::operator== const 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 Thu Nov 24 16:54:36 2005 for LTI-Lib by Doxygen 1.4.4