Fix the usage of min() (#368)
authorPeter Kovacs <kpeter@inf.elte.hu>
Sun, 02 May 2010 18:53:56 +0200
changeset 8915205145fabf6
parent 867 5b926cc36a4b
child 892 cbf32bf95954
child 894 bb70ad62c95f
Fix the usage of min() (#368)
lemon/network_simplex.h
     1.1 --- a/lemon/network_simplex.h	Tue Mar 16 21:12:10 2010 +0100
     1.2 +++ b/lemon/network_simplex.h	Sun May 02 18:53:56 2010 +0200
     1.3 @@ -1042,7 +1042,7 @@
     1.4        if (std::numeric_limits<Cost>::is_exact) {
     1.5          ART_COST = std::numeric_limits<Cost>::max() / 2 + 1;
     1.6        } else {
     1.7 -        ART_COST = std::numeric_limits<Cost>::min();
     1.8 +        ART_COST = 0;
     1.9          for (int i = 0; i != _arc_num; ++i) {
    1.10            if (_cost[i] > ART_COST) ART_COST = _cost[i];
    1.11          }
    1.12 @@ -1457,7 +1457,7 @@
    1.13        // optimality conditions
    1.14        if (_sum_supply == 0) {
    1.15          if (_stype == GEQ) {
    1.16 -          Cost max_pot = std::numeric_limits<Cost>::min();
    1.17 +          Cost max_pot = -std::numeric_limits<Cost>::max();
    1.18            for (int i = 0; i != _node_num; ++i) {
    1.19              if (_pi[i] > max_pot) max_pot = _pi[i];
    1.20            }