abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
lemon::_maps_bits Namespace Reference

Combination of two maps using an STL (binary) functor. More...

Detailed Description

This read-only map takes two maps and a binary functor and returns the combination of the two given maps using the functor. That is to say, if m1 is of type M1 and m2 is of 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]).

The Key type of the map is inherited from M1 (M1::Key must be convertible to M2::Key) and the Value type is V. 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.

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

See also
ComposeMap