diff -r 932b8490caf0 -r 614ce2dd3cba doc/maps.dox --- a/doc/maps.dox Sun Nov 13 20:01:17 2005 +0000 +++ b/doc/maps.dox Mon Nov 14 18:34:16 2005 +0000 @@ -27,14 +27,14 @@ Each graph structure in LEMON provides two standard map templates called \c EdgeMap and \c NodeMap. Both are reference maps and you can easily assign data to the nodes and to the edges of the graph. For example if you -have a graph \c G defined as +have a graph \c g defined as \code - ListGraph G; + ListGraph g; \endcode and you want to assign a floating point value to each edge, you can do it like this. \code - ListGraph::EdgeMap length(G); + ListGraph::EdgeMap length(g); \endcode Note that you must give the underlying graph to the constructor. @@ -94,8 +94,6 @@ An alternative way to define maps is to use \c MapBase -\todo For this, \c MapBase seems to be a better name then \c NullMap. - \code struct MyMap : public MapBase { @@ -116,13 +114,13 @@ public: Value operator[](Key e) const { - return orig_len.get(e)-(pot.get(G.target(e))-pot.get(G.source(e))); + return orig_len[e]-(pot[g.target(e)]-pot[g.source(e)]); } ReducedLengthMap(const Graph &_g, - const Graph::EdgeMap &o, - const Graph::NodeMap &p) - : G(g), orig_len(o), pot(p) {}; + const Graph::EdgeMap &_o, + const Graph::NodeMap &_p) + : g(_g), orig_len(_o), pot(_p) {}; }; \endcode