IdMap
Declared in lemon/maps.h, in the group Graph Maps; the same class on the Doxygen site.
-
template< typename GR , typename K >
class IdMap : public MapBase< K , int > Provides an immutable and unique id for each item in a graph.
IdMap provides a unique and immutable id for each item of the same type (
Node,ArcorEdge) in a graph. This id isunique: different items get different ids,
immutable: the id of an item does not change (even if you delete other nodes).
Using this map you get access (i.e. can read) the inner id values of the items stored in the graph, which is returned by the
id()function of the graph. This map can be inverted with its member classInverseMapor with theoperator()()member.See also
- Template Parameters:
GR – The graph type.
K – The key type of the map (
GR::Node,GR::ArcorGR::Edge).
Public Types
Public Functions
-
inline int operator[]( const Item & item ) const
Gives back the id of the item.
Gives back the immutable and unique id of the item.
-
inline InverseMap inverse() const
Gives back the inverse of the map.
Gives back the inverse of the IdMap.