1.1 --- a/doc/maps.dox Sun Nov 13 20:01:17 2005 +0000
1.2 +++ b/doc/maps.dox Mon Nov 14 18:34:16 2005 +0000
1.3 @@ -27,14 +27,14 @@
1.4 Each graph structure in LEMON provides two standard map templates called
1.5 \c EdgeMap and \c NodeMap. Both are reference maps and you can easily
1.6 assign data to the nodes and to the edges of the graph. For example if you
1.7 -have a graph \c G defined as
1.8 +have a graph \c g defined as
1.9 \code
1.10 - ListGraph G;
1.11 + ListGraph g;
1.12 \endcode
1.13 and you want to assign a floating point value to each edge, you can do
1.14 it like this.
1.15 \code
1.16 - ListGraph::EdgeMap<double> length(G);
1.17 + ListGraph::EdgeMap<double> length(g);
1.18 \endcode
1.19 Note that you must give the underlying graph to the constructor.
1.20
1.21 @@ -94,8 +94,6 @@
1.22
1.23 An alternative way to define maps is to use \c MapBase
1.24
1.25 -\todo For this, \c MapBase seems to be a better name then \c NullMap.
1.26 -
1.27 \code
1.28 struct MyMap : public MapBase<Graph::Edge,double>
1.29 {
1.30 @@ -116,13 +114,13 @@
1.31
1.32 public:
1.33 Value operator[](Key e) const {
1.34 - return orig_len.get(e)-(pot.get(G.target(e))-pot.get(G.source(e)));
1.35 + return orig_len[e]-(pot[g.target(e)]-pot[g.source(e)]);
1.36 }
1.37
1.38 ReducedLengthMap(const Graph &_g,
1.39 - const Graph::EdgeMap &o,
1.40 - const Graph::NodeMap &p)
1.41 - : G(g), orig_len(o), pot(p) {};
1.42 + const Graph::EdgeMap &_o,
1.43 + const Graph::NodeMap &_p)
1.44 + : g(_g), orig_len(_o), pot(_p) {};
1.45 };
1.46 \endcode
1.47