IntegerMap< T > Class Template Reference
[Maps]


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. #include <lemon/maps.h>

Inheritance diagram for IntegerMap< T >:

Inheritance graph
[legend]

List of all members.

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.


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