Changeset 2158:0b620ff10e7c in lemon-0.x
- Timestamp:
- 07/20/06 16:12:01 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2873
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_orientation.cc
r1956 r2158 75 75 for(NodeIt n(g);n!=INVALID;++n) active[n]=(def[n]>0); 76 76 77 ListGraph::EdgeMap<bool> rev(g,false); // rev[e]==true <=> e is be77 ListGraph::EdgeMap<bool> rev(g,false); // rev[e]==true <=> e is to be 78 78 // reversed 79 79 -
doc/graph_orientation.dox
r1953 r2158 12 12 The input of the problem is a(n undirected) graph and an integer value 13 13 <i>f(n)</i> assigned to each node \e n. The task is to find an orientation 14 of the edges for which the number of edge arriving toeach node \e n is at14 of the edges for which the number of edge arriving at each node \e n is at 15 15 least least <i>f(n)</i>. 16 16 … … 114 114 \skipline nodeNum 115 115 116 Here comes the algorithm sitself.116 Here comes the algorithm itself. 117 117 In each iteration we choose an active node (\c act will do it for us). 118 118 If there is … … 121 121 \until while 122 122 123 Then we check if there exists an edge leaving this node that steps down exactly 123 Then we check if there exists an edge leaving this node and 124 stepping down exactly 124 125 one level. 125 126 \skip OutEdge
Note: See TracChangeset
for help on using the changeset viewer.