IntegerMap Class Template Reference
[Maps]

#include <lemon/maps.h>

Inheritance diagram for IntegerMap:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<typename T>
class lemon::IntegerMap< T >

This map has the [0..size-1] keyset and the values are stored in a std::vector<T> container. It can be used with some data structures, for example UnionFind, BinHeap, when the used items are small integer numbers.

Public Types

typedef Parent::Key Key
 
typedef Parent::Value Value
 
typedef T & Reference
 
typedef const T & ConstReference
 

Public Member Functions

 IntegerMap (int size=0, const T &value=T())
 Constructor with specified default value.
template<typename T1>
 IntegerMap (const std::vector< T1 > &vector)
 Constructs the map from an appropriate std::vector.
template<typename T1>
 IntegerMap (const IntegerMap< T1 > &c)
 Constructs a map from an other IntegerMap.
void resize (int size, const T &value=T())
 Resize the container.
Reference operator[] (Key k)
 
ConstReference operator[] (Key k) const
 
void set (const Key &k, const T &t)
 

Related Functions

(Note that these are not member functions.)

template<typename T>
IntegerMap< T > integerMap (int size=0, const T &value=T())
 Returns an IntegerMap class.

The documentation for this class was generated from the following file:

Generated on Sat Apr 19 14:19:31 2008 for LEMON by  doxygen 1.5.5