ShiftWriteMap

Declared in lemon/maps.h, in the group Map Adaptors; the same class on the Doxygen site.

template< typename M , typename C = typename M::Value >
class ShiftWriteMap : public MapBase< M::Key , M::Value >

Shifts a map with a constant (read-write version).

This read-write map returns the sum of the given map and a constant value (i.e. it shifts the map with the constant). Its Key and Value are inherited from M. It makes also possible to write the map.

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

See also

ShiftMap

Public Types

typedef M::Key Key

typedef M::Value Value

Public Functions

inline ShiftWriteMap( M & m , const C & v )

Constructor.

Parameters:
  • m – The undelying map.

  • v – The constant value.

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

inline void set( const Key & k , const Value & v )