[Lemon-commits] deba: r3498 - lemon/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Tue Jun 10 13:36:18 CEST 2008
Author: deba
Date: Tue Jun 10 13:36:17 2008
New Revision: 3498
Modified:
lemon/trunk/lemon/max_matching.h
Log:
Bug fix initialization
The std::numeric_limits<double>::min() means the smallest positive number,
and not the smallest number in the whole range of double.
Modified: lemon/trunk/lemon/max_matching.h
==============================================================================
--- lemon/trunk/lemon/max_matching.h (original)
+++ lemon/trunk/lemon/max_matching.h Tue Jun 10 13:36:17 2008
@@ -2853,7 +2853,7 @@
int index = 0;
for (NodeIt n(_ugraph); n != INVALID; ++n) {
- Value max = std::numeric_limits<Value>::min();
+ Value max = - std::numeric_limits<Value>::max();
for (OutEdgeIt e(_ugraph, n); e != INVALID; ++e) {
if (_ugraph.target(e) == n) continue;
if ((dualScale * _weight[e]) / 2 > max) {
More information about the Lemon-commits
mailing list