Changeset 554:2d27cbaa982d in lemon0.x
 Timestamp:
 05/06/04 17:47:42 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@727
 Location:
 src/work/athos
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

src/work/athos/mincostflows.h
r551 r554 188 188 //This function checks, whether the given solution is optimal 189 189 //Running after a \c run() should return with true 190 //In this "state of the art" this only check optimality, doesn't bother with feasibility 190 191 bool checkSolution(){ 191 192 Length mod_pot; … … 193 194 FOR_EACH_LOC(typename Graph::EdgeIt, e, G){ 194 195 //C^{\Pi}_{i,j} 195 mod_pot = length[e]potential[G.head(e)]+potential[G. head(e)];196 mod_pot = length[e]potential[G.head(e)]+potential[G.tail(e)]; 196 197 fl_e = flow[e]; 198 // std::cout << fl_e << std::endl; 197 199 if (0<fl_e && fl_e<capacity[e]){ 198 200 if (mod_pot != 0) 
src/work/athos/mincostflows_test.cc
r551 r554 72 72 check( surb_test.run(s,t,k) == 2 && surb_test.totalLength() == 46,"Two paths, total length should be 46"); 73 73 74 check(surb_test.checkSolution(), "Is the primaldual solution pair really optimal?"); 75 74 76 k=1; 75 77 check( surb_test.run(s,t,k) == 1 && surb_test.totalLength() == 19,"One path, total length should be 19"); 78 79 check(surb_test.checkSolution(), "Is the primaldual solution pair really optimal?"); 76 80 77 81 //cout << surb_test.run(s,t,k) << surb_test.totalLength()<<endl;
Note: See TracChangeset
for help on using the changeset viewer.