Changeset 656:9971eb8bfbe8 in lemon-0.x for src/work/jacint
- Timestamp:
- 05/21/04 14:40:39 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@859
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/jacint/max_flow.h
r653 r656 123 123 AFTER_NOTHING, 124 124 AFTER_AUGMENTING, 125 AFTER_FAST_AUGMENTING, 125 126 AFTER_PRE_FLOW_PHASE_1, 126 127 AFTER_PRE_FLOW_PHASE_2 … … 266 267 NodeIt v; 267 268 switch (status) { 268 269 case AFTER_PRE_FLOW_PHASE_1: 269 270 for(g->first(v); g->valid(v); g->next(v)) { 270 271 if (level[v] < n) { … … 275 276 } 276 277 break; 277 278 278 case AFTER_PRE_FLOW_PHASE_2: 279 case AFTER_NOTHING: 279 280 minMinCut(M); 280 281 break; 281 282 case AFTER_AUGMENTING: 282 283 for(g->first(v); g->valid(v); g->next(v)) { 283 284 if (level[v]) { 285 M.set(v, true); 286 } else { 287 M.set(v, false); 288 } 289 } 290 break; 291 case AFTER_FAST_AUGMENTING: 292 for(g->first(v); g->valid(v); g->next(v)) { 293 if (level[v]==number_of_augmentations) { 284 294 M.set(v, true); 285 295 } else { … … 945 955 bool _augment=false; 946 956 947 if (status!=AFTER_ AUGMENTING) {948 FOR_EACH_LOC(typename Graph::NodeIt, e, *g) level.set(e, 3*n);949 number_of_augmentations= 3*n+1;957 if (status!=AFTER_FAST_AUGMENTING) { 958 FOR_EACH_LOC(typename Graph::NodeIt, e, *g) level.set(e, 0); 959 number_of_augmentations=1; 950 960 } else { 951 961 ++number_of_augmentations; … … 992 1002 } 993 1003 994 status=AFTER_ AUGMENTING;1004 status=AFTER_FAST_AUGMENTING; 995 1005 return _augment; 996 1006 }
Note: See TracChangeset
for help on using the changeset viewer.