# HG changeset patch # User alpar # Date 1079681949 0 # Node ID 0bd4fe53b1d0e141f26b6220663df5c239da449c # Parent b9158a014fe8833956ed7ab5901de96c912230b2 Documentation page for maps. diff -r b9158a014fe8 -r 0bd4fe53b1d0 doc/maps.dox --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/maps.dox Fri Mar 19 07:39:09 2004 +0000 @@ -0,0 +1,33 @@ +/*! + +\page maps How to write maps + +\section read-maps Readable Maps + +It is quite easy to write your own readmap for the edges or nodes of a graph. + +You can find some example below. + +\code +class MyMap +{ + double get(Graph::EdgeIt e) { return 1;} +}; +\endcode + +A more complex example + +\code +class MyLengthMap +{ + const Graph::EdgeMap &ol; + const Graph::NodeMap &pot; + + double get(Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u);} + + MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) : + ol(o), pot(p); +}; +\endcode + +*/