# HG changeset patch # User Alpar Juttner # Date 2010-05-03 10:56:24 # Node ID 0bca98cbebbbc65ed7baecaf7a4f68ab881e28e9 # Parent ca4059d632363489a221427757812860d4550d10 # Parent 5205145fabf68906e789911c2fc39968fd655f6e Merge bugfix #368 diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h --- a/lemon/network_simplex.h +++ b/lemon/network_simplex.h @@ -1077,7 +1077,7 @@ if (std::numeric_limits::is_exact) { ART_COST = std::numeric_limits::max() / 2 + 1; } else { - ART_COST = std::numeric_limits::min(); + ART_COST = 0; for (int i = 0; i != _arc_num; ++i) { if (_cost[i] > ART_COST) ART_COST = _cost[i]; } @@ -1589,7 +1589,7 @@ // optimality conditions if (_sum_supply == 0) { if (_stype == GEQ) { - Cost max_pot = std::numeric_limits::min(); + Cost max_pot = -std::numeric_limits::max(); for (int i = 0; i != _node_num; ++i) { if (_pi[i] > max_pot) max_pot = _pi[i]; }