# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1267165002 -3600
# Node ID acf6cb96c7d43bd58fcbde697e0a9b43367f1cbc
# Parent  2c35bef44dd12ecff705b0b9cd6cde34a9bb371b
Fix ambiguous use of sqrt (#350)

diff --git a/lemon/cost_scaling.h b/lemon/cost_scaling.h
--- a/lemon/cost_scaling.h
+++ b/lemon/cost_scaling.h
@@ -944,7 +944,8 @@
           BellmanFord<StaticDigraph, LargeCostArcMap> bf(_sgr, _cost_map);
           bf.init(0);
           bool done = false;
-          int K = int(BF_HEURISTIC_BOUND_FACTOR * sqrt(_res_node_num));
+          int K = int(BF_HEURISTIC_BOUND_FACTOR *
+                      std::sqrt(double(_res_node_num)));
           for (int i = 0; i < K && !done; ++i)
             done = bf.processNextWeakRound();
           if (done) break;
@@ -1072,7 +1073,8 @@
           BellmanFord<StaticDigraph, LargeCostArcMap> bf(_sgr, _cost_map);
           bf.init(0);
           bool done = false;
-          int K = int(BF_HEURISTIC_BOUND_FACTOR * sqrt(_res_node_num));
+          int K = int(BF_HEURISTIC_BOUND_FACTOR *
+                      std::sqrt(double(_res_node_num)));
           for (int i = 0; i < K && !done; ++i)
             done = bf.processNextWeakRound();
           if (done) break;
