equal
deleted
inserted
replaced
213 Length fl_e; |
213 Length fl_e; |
214 for(typename Graph::EdgeIt e(G); e!=INVALID; ++e) { |
214 for(typename Graph::EdgeIt e(G); e!=INVALID; ++e) { |
215 //C^{\Pi}_{i,j} |
215 //C^{\Pi}_{i,j} |
216 mod_pot = length[e]-potential[G.head(e)]+potential[G.tail(e)]; |
216 mod_pot = length[e]-potential[G.head(e)]+potential[G.tail(e)]; |
217 fl_e = flow[e]; |
217 fl_e = flow[e]; |
218 // std::cout << fl_e << std::endl; |
218 if (0<fl_e && fl_e<capacity[e]) { |
219 if (0<fl_e && fl_e<capacity[e]){ |
219 /// \todo better comparison is needed for real types, moreover, |
|
220 /// this comparison here is superfluous. |
220 if (mod_pot != 0) |
221 if (mod_pot != 0) |
221 return false; |
222 return false; |
222 } |
223 } |
223 else{ |
224 else { |
224 if (mod_pot > 0 && fl_e != 0) |
225 if (mod_pot > 0 && fl_e != 0) |
225 return false; |
226 return false; |
226 if (mod_pot < 0 && fl_e != capacity[e]) |
227 if (mod_pot < 0 && fl_e != capacity[e]) |
227 return false; |
228 return false; |
228 } |
229 } |