CombineMap Class Template Reference
[Map Adaptors]

#include <lemon/maps.h>

Inherits MapBase< M1::Key, V >.

Inheritance diagram for CombineMap:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename M1, typename M2, typename F, typename V = typename F::result_type, typename NC = False>
class lemon::CombineMap< M1, M2, F, V, NC >

Combines of two maps using an STL (binary) functor.

This read only map takes two maps and a binary functor and returns the composition of the two given maps unsing the functor. That is to say, if m1 and m2 is of type M1 and M2 and f is of F, then for

       CombineMap<M1, M2,F,V> cm(m1,m2,f);
cm[x] will be equal to f(m1[x],m2[x])

Its Key is inherited from M1 and its Value is V. The M2::Value and M1::Value must be convertible to the corresponding input parameter of F and the return type of F must be convertible to V.

Todo:
Check the requirements.


Public Member Functions

 CombineMap (const M1 &_m1, const M2 &_m2, const F &_f)
 Constructor.

Related Functions

(Note that these are not member functions.)

CombineMap< M1, M2, F, V > combineMap (const M1 &m1, const M2 &m2, const F &f)
 Returns a CombineMap class.


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:42:20 2006 for LEMON by  doxygen 1.4.6