Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DescriptorMap Class Template Reference
[Graph Maps]

#include <lemon/graph_utils.h>

List of all members.


Detailed Description

template<typename _Graph, typename _Item, typename _Map = typename ItemSetTraits<_Graph, _Item>::template Map<int>::Parent>
class lemon::DescriptorMap< _Graph, _Item, _Map >

The DescriptorMap class provides a unique and continuous (but mutable) descriptor (id) for each item of the same type (e.g. node) in the graph. This id is This map can be inverted with its member class InverseMap.

Parameters:
_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 & Destructor Documentation

DescriptorMap const Graph _graph  )  [inline]
 

Constructor for descriptor map.


Member Function Documentation

virtual void add const Item &  item  )  [inline, protected, virtual]
 

Add a new key to the map. It is called by the AlterationNotifier.

virtual void erase const Item &  item  )  [inline, protected, virtual]
 

Erase the key to the map. It is called by the AlterationNotifier.

virtual void build  )  [inline, protected, virtual]
 

Build the unique map. It is called by the AlterationNotifier.

virtual void clear  )  [inline, protected, virtual]
 

Clear the keys from the map. It is called by the AlterationNotifier.

void swap const Item &  p,
const Item &  q
[inline]
 

Swaps the position of the two items in the map.

int operator[] const Item &  item  )  const [inline]
 

Gives back the mutable and unique descriptor of the map.

const InverseMap inverse  )  const [inline]
 

Gives back the inverse of the map.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:15:36 2005 for LEMON by  doxygen 1.4.4