MapToFunctor

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

template< typename M >
class MapToFunctor : public MapBase< M::Key , M::Value >

Converts a map to an STL style (unary) functor.

This class converts a map to an STL style (unary) functor. That is it provides an operator() to read its values.

For the sake of convenience it also works as a usual readable map, i.e. operator[] and the Key and Value typedefs also exist.

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

See also

FunctorToMap

Public Types

typedef M::Key Key

typedef M::Value Value

typedef M::Key argument_type
typedef M::Value result_type

Public Functions

inline MapToFunctor( const M & m )

Constructor.

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

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