Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CombineMap Class Template Reference
[Map Adaptors]

#include <lemon/maps.h>

List of all members.


Detailed Description

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

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 Types

typedef M1::Key Key
 
typedef V Value
 

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 > 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 Sat Aug 27 14:16:08 2005 for LEMON by  doxygen 1.4.4