Definition
An instance it of class STLNodeIt< DataAccessor, Iter > is a STL iterator wrapper for node iterators (e.g. NodeIt, FilterNodeIt<pred,NodeIt>). It adds all type tags and methods that are necessary for STL conformance; see the standard draft working paper for details. The type tag value_type is equal to typename DataAccessor::value_type and the return value of operator*.
Class STLEdgeIt and STLAdjIt are defined analogously, i.e. can be used for edge iterators or adjacency iterators, respectively.
Precondition: The template parameter Iter must be a node iterator. DataAccessor must be a data accessor.
Note: There are specialized versions of STL wrapper iterator classes for each kind of iterator that return different LEDA graph objects.
class name | operator*() returns |
NodeIt_n | node |
EdgeIt_e | edge |
AdjIt_n | node |
AdjIt_e | edge |
OutAdjIt_n | node |
OutAdjIt_e | edge |
InAdjIt_n | node |
InAdjIt_e | edge |
#include < LEDA/graph/graph_iterator.h >
Creation
STLNodeIt< DataAccessor, Iter > | it(DataAccessor da, const Iter& base_it) | |
introduces a variable it of this class bound to da and base_it. |
Operations