[Lemon-commits] [lemon_svn] alpar: r305 - hugo/trunk/doc

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:38:37 CET 2006


Author: alpar
Date: Fri Mar 19 22:15:14 2004
New Revision: 305

Modified:
   hugo/trunk/doc/maps.dox

Log:
get() -> operator[]()


Modified: hugo/trunk/doc/maps.dox
==============================================================================
--- hugo/trunk/doc/maps.dox	(original)
+++ hugo/trunk/doc/maps.dox	Fri Mar 19 22:15:14 2004
@@ -13,21 +13,14 @@
 \code
 class MyMap 
 {
-  double get(Graph::EdgeIt e) const { return M_PI;}
-};
-\endcode
-
-Or if we accept the new map style, it will look like this:
-
-\code
-class MyMap 
-{
   double operator[](Graph::EdgeIt e) const { return 1;}
 };
 \endcode
 
 
-A more complex example
+Here is a more complex example. It provides a length function which is obtained
+from a base length function modified by a potential difference.
+\todo Please improve on the english. 
 
 \code
 class MyLengthMap 
@@ -35,7 +28,9 @@
   const Graph::EdgeMap &ol;
   const Graph::NodeMap &pot;
   
-  double get(Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u);}
+  double operator[](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);



More information about the Lemon-commits mailing list