Changeset 194:a1680b3c516c in lemon0.x for src/work/edmonds_karp.h
 Timestamp:
 03/17/04 16:09:48 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@271
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/edmonds_karp.h
r193 r194 533 533 public: 534 534 typedef typename Graph::Node Node; 535 typedef typename Graph::NodeIt NodeIt; 535 536 typedef typename Graph::Edge Edge; 536 537 typedef typename Graph::EdgeIt EdgeIt; … … 564 565 for(NodeIt s=G>template first<NodeIt>(); G>valid(s); G>next(s)) { 565 566 Number f=0; 566 for(OutEdgeIt e=G>template first<OutEdgeIt>( ); G>valid(e); G>next(e))567 for(OutEdgeIt e=G>template first<OutEdgeIt>(s); G>valid(e); G>next(e)) 567 568 f+=flow>get(e); 568 569 if (f<1) { … … 587 588 free.set(w, res_graph.free(e)); 588 589 } 589 if (T Map(res_graph.head(e))) {590 if (T>get(res_graph.head(e))) { 590 591 n=res_graph.head(e); 591 592 _augment=true; … … 599 600 if (_augment) { 600 601 //Node n=t; 601 Number augment_value=free.get( t);602 Number augment_value=free.get(n); 602 603 while (res_graph.valid(pred.get(n))) { 603 604 AugEdge e=pred.get(n); … … 806 807 } 807 808 } 808 template<typename MutableGraph> void run() {809 //int num_of_augmentations=0;810 //while (augmentOnShortestPath()) {811 while (augmentOnBlockingFlow<MutableGraph>()) {812 //std::cout << ++num_of_augmentations << " ";813 //std::cout<<std::endl;814 }815 } 809 // template<typename MutableGraph> void run() { 810 // //int num_of_augmentations=0; 811 // //while (augmentOnShortestPath()) { 812 // while (augmentOnBlockingFlow<MutableGraph>()) { 813 // //std::cout << ++num_of_augmentations << " "; 814 // //std::cout<<std::endl; 815 // } 816 // } 816 817 Number flowValue() { 817 818 Number a=0; 818 OutEdgeIt e;819 for(G>/*getF*/first(e , s); G>valid(e); G>next(e)) {819 EdgeIt e; 820 for(G>/*getF*/first(e); G>valid(e); G>next(e)) { 820 821 a+=flow>get(e); 821 822 }
Note: See TracChangeset
for help on using the changeset viewer.