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

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


Author: alpar
Date: Wed Sep 14 12:00:43 2005
New Revision: 2206

Modified:
   hugo/trunk/doc/graph_orientation.dox

Log:
Better doc.

Modified: hugo/trunk/doc/graph_orientation.dox
==============================================================================
--- hugo/trunk/doc/graph_orientation.dox	(original)
+++ hugo/trunk/doc/graph_orientation.dox	Wed Sep 14 12:00:43 2005
@@ -6,7 +6,28 @@
 \brief Graph orientation with lower bound requirement on the
 in-degree of the nodes.
 
+This demo shows an adaptation of the well-known "preflow push" algorithm to
+a simple graph orientation problem.
 
+The input of the problem is a(n undirected) graph and an integer value
+<i>f(n)</i> assigned to each node \e n. The task is to find an orientation
+of the edges for which the number of edge arriving to each node \e n is at
+least least <i>f(n)</i>.
+
+In fact, the algorithm reads a directed graph and computes a set of edges to
+be reversed in order to achieve the in-degree requirement.
+This input is given using 
+\ref graph-io-page ".lgf (Lemon Graph Format)" file. It should contain
+three node maps. The one called "f" contains the in-degree requirements, while
+"coordinate_x" and "coordinate_y" indicate the position of the nodes. These
+latter ones are used to generate the output, which is a <tt>.eps</tt> file.
+
+
+\section go-alg-dec The C++ source file
+
+Here you find how to solve the problem above using lemon.
+
+\subsection go-alg-head Headers and convenience typedefs
 
 First we include some important headers.
 
@@ -36,6 +57,8 @@
 \skip typedef
 \until InEdgeIt
 
+\subsection go-alg-main The main() function
+
 Well, we are ready to start <tt>main()</tt>.
 \skip main
 \until {
@@ -47,7 +70,7 @@
 \until }
 
 Now, we read a graph \c g, and a map \c f containing
-the in-deg requirements from a \ref graph-io-page ".lgf" (Lemon Graph Format)
+the in-deg requirements from a \ref graph-io-page ".lgf (Lemon Graph Format)"
 file. To generate the output picture, we also read the node titles (\c id) and
 coordinates (\c coords).
 So, first we create the graph



More information about the Lemon-commits mailing list