- Main Page
- Modules
- Classes
- Namespaces
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Related Functions
RangeMap< V > Class Template Reference
Maps

## Detailed Description

### template<typename V>
class lemon::RangeMap< V >

This map is essentially a wrapper for `std::vector`. It assigns values to integer keys from the range `[0..size-1]`. It can be used together with some data structures, e.g. heap types and `UnionFind`, when the used items are small integers. This map conforms to the ReferenceMap concept.

The simplest way of using this map is through the rangeMap() function.

`#include <lemon/maps.h>`

Inheritance diagram for RangeMap< V >:
[legend]

## Public Types
typedef int | Key
| Key type.
typedef V | Value
| Value type.
typedef Vector::reference | Reference
| Reference type.
typedef Vector::const_reference | ConstReference
| Const reference type.
Public Types inherited from MapBase< int, V >
typedef int | Key
| The key type of the map.
typedef V | Value
| The value type of the map. (The type of objects associated with the keys).

## Public Member Functions
Reference | operator[] (const Key &k)
ConstReference | operator[] (const Key &k) const
void | set (const Key &k, const Value &v)

## Public Attributes
| __pad0__: _vector(size
| Constructor with specified default value.

## Related Functions
(Note that these are not member functions.)
template<typename V >
RangeMap< V > | rangeMap (int size=0, const V &value=V())
| Returns a `RangeMap` class. More...
template<typename V >
RangeMap< V > | rangeMap (const std::vector< V > &vector)
| Returns a `RangeMap` class created from an appropriate `std::vector`. More...