3 \page maps How to write maps
5 \section read-maps Readable Maps
7 It is quite easy to write your own readmap for the edges or nodes of a graph.
9 You can find some example below.
11 This simple map assigns \f$\pi\f$ to each edge.
16 double get(Graph::EdgeIt e) const { return M_PI;}
20 Or if we accept the new map style, it will look like this:
25 double operator[](Graph::EdgeIt e) const { return 1;}
30 A more complex example
35 const Graph::EdgeMap &ol;
36 const Graph::NodeMap &pot;
38 double get(Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u);}
40 MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) :