LEMON 1.0.7
|
The IdMap class provides a unique and immutable id for each item of the same type (e.g. node) in the graph. This id is
Through this map you get access (i.e. can read) the inner id values of the items stored in the graph. This map can be inverted with its member class InverseMap
or with the operator()
member.
#include <lemon/maps.h>
Classes | |
class | InverseMap |
The class represents the inverse of its owner (IdMap). More... | |
Public Member Functions | |
IdMap (const Graph &graph) | |
Constructor. | |
int | operator[] (const Item &item) const |
Gives back the id of the item. | |
Item | operator() (int id) |
InverseMap | inverse () const |
Gives back the inverse of the map. |
IdMap | ( | const Graph & | graph | ) | [inline, explicit] |
Constructor of the map.
int operator[] | ( | const Item & | item | ) | const [inline] |
Gives back the immutable and unique id of the item.
Item operator() | ( | int | id | ) | [inline] |
Gives back the item by its id.
InverseMap inverse | ( | ) | const [inline] |
Gives back the inverse of the IdMap.