Documentation page for maps.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/doc/maps.dox Fri Mar 19 07:39:09 2004 +0000
1.3 @@ -0,0 +1,33 @@
1.4 +/*!
1.5 +
1.6 +\page maps How to write maps
1.7 +
1.8 +\section read-maps Readable Maps
1.9 +
1.10 +It is quite easy to write your own readmap for the edges or nodes of a graph.
1.11 +
1.12 +You can find some example below.
1.13 +
1.14 +\code
1.15 +class MyMap
1.16 +{
1.17 + double get(Graph::EdgeIt e) { return 1;}
1.18 +};
1.19 +\endcode
1.20 +
1.21 +A more complex example
1.22 +
1.23 +\code
1.24 +class MyLengthMap
1.25 +{
1.26 + const Graph::EdgeMap &ol;
1.27 + const Graph::NodeMap &pot;
1.28 +
1.29 + double get(Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u);}
1.30 +
1.31 + MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) :
1.32 + ol(o), pot(p);
1.33 +};
1.34 +\endcode
1.35 +
1.36 +*/