Bug fix initialization
authordeba
Tue, 10 Jun 2008 11:36:17 +0000
changeset 26123d65053d01a3
parent 2611 b526b87d8c2f
child 2613 3d14a3449362
Bug fix initialization
The std::numeric_limits<double>::min() means the smallest positive number,
and not the smallest number in the whole range of double.
lemon/max_matching.h
     1.1 --- a/lemon/max_matching.h	Sun May 25 16:35:05 2008 +0000
     1.2 +++ b/lemon/max_matching.h	Tue Jun 10 11:36:17 2008 +0000
     1.3 @@ -2853,7 +2853,7 @@
     1.4  
     1.5        int index = 0;
     1.6        for (NodeIt n(_ugraph); n != INVALID; ++n) {
     1.7 -	Value max = std::numeric_limits<Value>::min();
     1.8 +	Value max = - std::numeric_limits<Value>::max();
     1.9  	for (OutEdgeIt e(_ugraph, n); e != INVALID; ++e) {
    1.10  	  if (_ugraph.target(e) == n) continue;
    1.11  	  if ((dualScale * _weight[e]) / 2 > max) {