[Lemon-commits] Alpar Juttner: Merge bugfix #368 to branch 1.1

Lemon HG hg at lemon.cs.elte.hu
Mon May 3 11:00:48 CEST 2010


details:   http://lemon.cs.elte.hu/hg/lemon/rev/4f8b22521b4a
changeset: 977:4f8b22521b4a
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Mon May 03 10:16:01 2010 +0200
description:
	Merge bugfix #368 to branch 1.1

diffstat:

 lemon/network_simplex.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
--- a/lemon/network_simplex.h
+++ b/lemon/network_simplex.h
@@ -1042,7 +1042,7 @@
       if (std::numeric_limits<Cost>::is_exact) {
         ART_COST = std::numeric_limits<Cost>::max() / 2 + 1;
       } else {
-        ART_COST = std::numeric_limits<Cost>::min();
+        ART_COST = 0;
         for (int i = 0; i != _arc_num; ++i) {
           if (_cost[i] > ART_COST) ART_COST = _cost[i];
         }
@@ -1457,7 +1457,7 @@
       // optimality conditions
       if (_sum_supply == 0) {
         if (_stype == GEQ) {
-          Cost max_pot = std::numeric_limits<Cost>::min();
+          Cost max_pot = -std::numeric_limits<Cost>::max();
           for (int i = 0; i != _node_num; ++i) {
             if (_pi[i] > max_pot) max_pot = _pi[i];
           }



More information about the Lemon-commits mailing list