IterableValueMap< _Graph, _Item, _Value > Class Template Reference
[Graph Maps]


Detailed Description

template<typename _Graph, typename _Item, typename _Value>
class lemon::IterableValueMap< _Graph, _Item, _Value >

This class provides a special graph map type which can store for each graph item(node, edge, etc.) a value. For each value it is possible to iterate on the keys which mapped to the given value. The type stores for each value a linked list with the items which mapped to the value, and the values are stored in balanced binary tree. The values of the map can be accessed with stl compatible forward iterator.

This type is not reference map so it cannot be modified with the subscription operator.

See also:
InvertableMap
Parameters:
_Graph The graph type.
_Item One of the graph's item type, the key of the map.
_Value Any comparable value type.
#include <lemon/iterable_maps.h>

Inheritance diagram for IterableValueMap< _Graph, _Item, _Value >:

Inheritance graph
[legend]

List of all members.

Classes

class  ItemIt
 Iterator for the keys with the same value. More...
class  ValueIterator
 Forward iterator for values. More...

Public Types

typedef _Item Key
 The key type.
typedef _Value Value
 The value type.
typedef _Graph Graph
 The graph type.

Public Member Functions

 IterableValueMap (const Graph &graph, const Value &value=Value())
ValueIterator beginValue () const
 Returns an iterator to the first value.
ValueIterator endValue () const
 Returns an iterator after the last value.
void set (const Key &key, const Value &value)
const Valueoperator[] (const Key &key) const


Constructor & Destructor Documentation

IterableValueMap ( const Graph graph,
const Value value = Value() 
) [inline, explicit]

Constructor of the Map with a given value.


Member Function Documentation

ValueIterator beginValue (  )  const [inline]

Returns an stl compatible iterator to the first value of the map. The values of the map can be accessed in the [beginValue, endValue) range.

ValueIterator endValue (  )  const [inline]

Returns an stl compatible iterator after the last value of the map. The values of the map can be accessed in the [beginValue, endValue) range.

void set ( const Key key,
const Value value 
) [inline]

Set operation of the map.

Reimplemented from ArrayMap< _Graph, _Item, _Value >.

const Value& operator[] ( const Key key  )  const [inline]

Const subscript operator of the map.

Reimplemented from ArrayMap< _Graph, _Item, _Value >.


Generated on Thu Jun 4 04:04:53 2009 for LEMON by  doxygen 1.5.9