doc/graph_orientation.dox
changeset 1953 d4f411003580
parent 1715 e71778873dd0
child 2158 0b620ff10e7c
     1.1 --- a/doc/graph_orientation.dox	Fri Feb 03 14:22:45 2006 +0000
     1.2 +++ b/doc/graph_orientation.dox	Fri Feb 03 15:58:24 2006 +0000
     1.3 @@ -63,7 +63,7 @@
     1.4  \skip main
     1.5  \until {
     1.6  
     1.7 -First we check whether the program is called with exactly 1 parameter.
     1.8 +First we check whether the program is called with exactly one parameter.
     1.9  If it isn't, we print a short help message end exit.
    1.10  The vast majority of people would probably skip this block.
    1.11  \skip if
    1.12 @@ -71,7 +71,8 @@
    1.13  
    1.14  Now, we read a graph \c g, and a map \c f containing
    1.15  the in-deg requirements from a \ref graph-io-page ".lgf (Lemon Graph Format)"
    1.16 -file. To generate the output picture, we also read the node titles (\c id) and
    1.17 +file. To generate the output picture, we also read the node titles (\c label)
    1.18 +and
    1.19  coordinates (\c coords).
    1.20  So, first we create the graph
    1.21  \skipline ListGraph
    1.22 @@ -86,8 +87,9 @@
    1.23  \until }
    1.24  \until }
    1.25  
    1.26 -The algorithm needs a "level" integer value assigned to each node. In the
    1.27 -beginning, the nodes are on level 0.
    1.28 +The algorithm needs an integer value assigned to each node. We call this "level" and the nodes are on level 0 at the
    1.29 +beginning of the execution.
    1.30 +
    1.31  \skipline level
    1.32  
    1.33  The deficiency (\c def) of a node is the in-degree requirement minus the 
    1.34 @@ -101,9 +103,10 @@
    1.35  \skip active
    1.36  \until def
    1.37  
    1.38 -We also store in a bool map indicating which edges are reverted. Actually this is only
    1.39 +We also store in a bool map indicating which edges are reverted.
    1.40 +Actually this map called \c rev is only
    1.41  used to draw these edges with different color in the output picture. The
    1.42 -algorithm will update this map called \c rev, but will not use it otherwise.
    1.43 +algorithm updates this map, but will not use it otherwise.
    1.44  \skip rev
    1.45  \until reversed
    1.46  
    1.47 @@ -111,7 +114,8 @@
    1.48  \skipline nodeNum
    1.49  
    1.50  Here comes the algorithms itself. 
    1.51 -In each iteration we choose an active node (\c act will store it). If there is
    1.52 +In each iteration we choose an active node (\c act will do it for us).
    1.53 +If there is
    1.54  no such a node, then the orientation is feasible so we are done.
    1.55  \skip act
    1.56  \until while