src/hugo/mincostflows.h
changeset 894 68a18cd0505c
parent 893 89d5c283a485
     1.1 --- a/src/hugo/mincostflows.h	Tue Sep 21 21:10:26 2004 +0000
     1.2 +++ b/src/hugo/mincostflows.h	Tue Sep 21 21:28:43 2004 +0000
     1.3 @@ -215,12 +215,13 @@
     1.4  	//C^{\Pi}_{i,j}
     1.5  	mod_pot = length[e]-potential[G.head(e)]+potential[G.tail(e)];
     1.6  	fl_e = flow[e];
     1.7 -	//	std::cout << fl_e << std::endl;
     1.8 -	if (0<fl_e && fl_e<capacity[e]){
     1.9 +	if (0<fl_e && fl_e<capacity[e]) {
    1.10 +	  /// \todo better comparison is needed for real types, moreover, 
    1.11 +	  /// this comparison here is superfluous.
    1.12  	  if (mod_pot != 0)
    1.13  	    return false;
    1.14 -	}
    1.15 -	else{
    1.16 +	} 
    1.17 +	else {
    1.18  	  if (mod_pot > 0 && fl_e != 0)
    1.19  	    return false;
    1.20  	  if (mod_pot < 0 && fl_e != capacity[e])