As initial value of a new map expression with ()+-/* operators can be given. These operators work on numbers, or on maps. If maps are given, then the new value for a given graph element will be calculated using the value from the given maps that belong to that graph element.
4 #include <lemon/list_graph.h>
7 using lemon::ListGraph;
17 typedef typename M::Key Key;
18 typedef xy<typename M::Value> Value;
20 XYMap(M &_xmap, M &_ymap) : xmap(&_xmap), ymap(&_ymap) {}
21 void setXMap(M &_xmap) { xmap = &_xmap; }
22 void setYMap(M &_ymap) { ymap = &_ymap; }
23 Value operator[](Key k) const
25 Value v(xmap->operator[](k), ymap->operator[](k));
28 void set(Key k, Value v)