# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1272819236 -7200
# Node ID 5205145fabf68906e789911c2fc39968fd655f6e
# Parent 5b926cc36a4b4c53712651778e2ad62115d2b023
Fix the usage of min() (#368)
diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
a
|
b
|
|
1042 | 1042 | if (std::numeric_limits<Cost>::is_exact) { |
1043 | 1043 | ART_COST = std::numeric_limits<Cost>::max() / 2 + 1; |
1044 | 1044 | } else { |
1045 | | ART_COST = std::numeric_limits<Cost>::min(); |
| 1045 | ART_COST = 0; |
1046 | 1046 | for (int i = 0; i != _arc_num; ++i) { |
1047 | 1047 | if (_cost[i] > ART_COST) ART_COST = _cost[i]; |
1048 | 1048 | } |
… |
… |
|
1457 | 1457 | // optimality conditions |
1458 | 1458 | if (_sum_supply == 0) { |
1459 | 1459 | if (_stype == GEQ) { |
1460 | | Cost max_pot = std::numeric_limits<Cost>::min(); |
| 1460 | Cost max_pot = -std::numeric_limits<Cost>::max(); |
1461 | 1461 | for (int i = 0; i != _node_num; ++i) { |
1462 | 1462 | if (_pi[i] > max_pot) max_pot = _pi[i]; |
1463 | 1463 | } |