Changeset 30:10a3f2e0928c in lemon-0.x for src/work/preflow_push_max_flow.hh
- Timestamp:
- 01/21/04 15:51:05 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@43
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/preflow_push_max_flow.hh
r21 r30 81 81 reverse_bfs<list_graph> bfs(G, t); 82 82 bfs.run(); 83 for(each_node_iterator v=G.first_node(); v. is_valid(); ++v)83 for(each_node_iterator v=G.first_node(); v.valid(); ++v) 84 84 { 85 85 int dist=bfs.dist(v); … … 94 94 /* Starting flow. It is everywhere 0 at the moment. */ 95 95 96 for(out_edge_iterator i=G.first_out_edge(s); i. is_valid(); ++i)96 for(out_edge_iterator i=G.first_out_edge(s); i.valid(); ++i) 97 97 { 98 98 node_iterator w=G.head(i); … … 127 127 int newlevel=2*n-2; //In newlevel we maintain the next level of w. 128 128 129 for(out_edge_iterator e=G.first_out_edge(w); e. is_valid(); ++e) {129 for(out_edge_iterator e=G.first_out_edge(w); e.valid(); ++e) { 130 130 node_iterator v=G.head(e); 131 131 /*e is the edge wv.*/ … … 168 168 } //if (flow.get(e)<capacity.get(e)) 169 169 170 } //for(out_edge_iterator e=G.first_out_edge(w); e. is_valid(); ++e)170 } //for(out_edge_iterator e=G.first_out_edge(w); e.valid(); ++e) 171 171 172 172 173 173 174 for(in_edge_iterator e=G.first_in_edge(w); e. is_valid(); ++e) {174 for(in_edge_iterator e=G.first_in_edge(w); e.valid(); ++e) { 175 175 node_iterator v=G.tail(e); 176 176 /*e is the edge vw.*/ … … 244 244 /*If the level of w gets empty.*/ 245 245 246 for (each_node_iterator v=G.first_node() ; v. is_valid() ; ++v) {246 for (each_node_iterator v=G.first_node() ; v.valid() ; ++v) { 247 247 if (level.get(v) >= l ) { 248 248 level.put(v,n); … … 278 278 else break; 279 279 } 280 for (each_node_iterator v=G.first_node(); v. is_valid(); ++v) {280 for (each_node_iterator v=G.first_node(); v.valid(); ++v) { 281 281 if (level.get(v) > e) mincutvector.put(v, true); 282 282 }
Note: See TracChangeset
for help on using the changeset viewer.