# 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 -r 5b926cc36a4b -r 5205145fabf6 lemon/network_simplex.h
--- a/lemon/network_simplex.h	Tue Mar 16 21:12:10 2010 +0100
+++ b/lemon/network_simplex.h	Sun May 02 18:53:56 2010 +0200
@@ -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];
           }