#include <lemon/graph_utils.h>
n-1
, where n
is the number of the items of this type (e.g. nodes) (so the id of a node can change if you delete an other node, i.e. this id is mutable). InverseMap
.
_Graph | The graph class the DescriptorMap belongs to. | |
_Item | The Item is the Key of the Map. It may be Node, Edge or UndirEdge. | |
_Map | A ReadWriteMap mapping from the item type to integer. |
Public Types | |
typedef _Graph | Graph |
The graph class of DescriptorMap. | |
typedef _Map::Key | Key |
The key type of DescriptorMap (Node, Edge, UndirEdge). | |
typedef _Map::Value | Value |
The value type of DescriptorMap. | |
Public Member Functions | |
DescriptorMap (const Graph &_graph) | |
Constructor. | |
void | swap (const Item &p, const Item &q) |
Swaps the position of the two items in the map. | |
int | operator[] (const Item &item) const |
Gives back the descriptor of the item. | |
const InverseMap | inverse () const |
Gives back the inverse of the map. | |
Protected Member Functions | |
virtual void | add (const Item &item) |
Add a new key to the map. | |
virtual void | erase (const Item &item) |
Erase the key from the map. | |
virtual void | build () |
Build the unique map. | |
virtual void | clear () |
Clear the keys from the map. | |
Classes | |
class | InverseMap |
The inverse map type of DescriptorMap. More... |
|
Constructor for descriptor map. |
|
Add a new key to the map. It is called by the |
|
Erase the key to the map. It is called by the |
|
Build the unique map. It is called by the |
|
Clear the keys from the map. It is called by the |
|
Swaps the position of the two items in the map. |
|
Gives back the mutable and unique descriptor of the map. |
|
Gives back the inverse of the map. |