alpar@202: /*! alpar@202: alpar@202: \page maps How to write maps alpar@202: alpar@202: \section read-maps Readable Maps alpar@202: alpar@202: It is quite easy to write your own readmap for the edges or nodes of a graph. alpar@202: alpar@202: You can find some example below. alpar@202: alpar@204: This simple map assigns \f$\pi\f$ to each edge. alpar@204: alpar@202: \code alpar@202: class MyMap alpar@202: { alpar@205: double operator[](Graph::EdgeIt e) const { return 1;} alpar@204: }; alpar@204: \endcode alpar@204: alpar@204: alpar@210: Here is a more complex example. It provides a length function which is obtained alpar@210: from a base length function modified by a potential difference. alpar@210: \todo Please improve on the english. alpar@202: alpar@202: \code alpar@202: class MyLengthMap alpar@202: { alpar@202: const Graph::EdgeMap &ol; alpar@202: const Graph::NodeMap &pot; alpar@202: alpar@210: double operator[](Graph::EdgeIt e) const { alpar@210: return ol.get(e)-pot.get(v)-pot.get(u); alpar@210: } alpar@202: alpar@202: MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) : alpar@202: ol(o), pot(p); alpar@202: }; alpar@202: \endcode alpar@202: alpar@202: */