[Lemon-commits] [lemon_svn] alpar: r407 - hugo/trunk/doc
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:39:16 CET 2006
Author: alpar
Date: Sun Apr 4 11:17:58 2004
New Revision: 407
Modified:
hugo/trunk/doc/Doxyfile
hugo/trunk/doc/maps.dox
Log:
Some improvements and proposals in map.doc.
demo -> work in Doxyfile.
Modified: hugo/trunk/doc/Doxyfile
==============================================================================
--- hugo/trunk/doc/Doxyfile (original)
+++ hugo/trunk/doc/Doxyfile Sun Apr 4 11:17:58 2004
@@ -398,7 +398,7 @@
../src/include/dijkstra.h \
../src/include/bin_heap.h \
../src/include/fib_heap.h \
- ../src/demo/athos/xy/xy.h \
+ ../src/work/athos/xy/xy.h \
maps.dox
# If the value of the INPUT tag contains directories, you can use the
Modified: hugo/trunk/doc/maps.dox
==============================================================================
--- hugo/trunk/doc/maps.dox (original)
+++ hugo/trunk/doc/maps.dox Sun Apr 4 11:17:58 2004
@@ -1,10 +1,13 @@
/*!
-\page maps How to write maps
+\page maps How to write your own maps
\section read-maps Readable Maps
-It is quite easy to write your own readmap for the edges or nodes of a graph.
+The readable maps are very frequently used as the input of the
+algorithms. For this purpose the most straightforward is to use the
+maps provided by Hugo's graph structres. Very often however, it is more
+convenient and/or more efficient to write your own readable map.
You can find some example below.
@@ -14,14 +17,32 @@
struct MyMap
{
typedef double ValueType;
- double operator[](Graph::EdgeIt e) const { return M_PI;}
+ double operator[](Graph::Edge e) const { return M_PI;}
+};
+\endcode
+
+An alternative way to define maps. For this, \c MapBase seems to
+be a better name then \c NullMap
+
+\code
+struct MyMap : public MapBase<Edge,double>
+{
+ double operator[](Graph::Edge e) const { return M_PI;}
+};
+\endcode
+
+Or if we had \c KeyType and \c ValueType
+
+\code
+struct MyMap : public MapBase<Edge,double>
+{
+ ValueType operator[](KeyType e) const { return M_PI;}
};
\endcode
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
@@ -32,7 +53,7 @@
public:
typedef double ValueType;
- double operator[](Graph::EdgeIt e) const {
+ double operator[](Graph::Edge e) const {
return ol.get(e)-pot.get(v)-pot.get(u);
}
@@ -41,5 +62,6 @@
};
\endcode
+\todo Please improve on the english.
\todo Don't we need \e to \e require a 'typedef xxx KeyType' tag, as well?
*/
More information about the Lemon-commits
mailing list