# 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
|
b
|
|
| 944 | 944 | BellmanFord<StaticDigraph, LargeCostArcMap> bf(_sgr, _cost_map); |
| 945 | 945 | bf.init(0); |
| 946 | 946 | bool done = false; |
| 947 | | int K = int(BF_HEURISTIC_BOUND_FACTOR * sqrt(_res_node_num)); |
| | 947 | int K = int(BF_HEURISTIC_BOUND_FACTOR * |
| | 948 | std::sqrt(double(_res_node_num))); |
| 948 | 949 | for (int i = 0; i < K && !done; ++i) |
| 949 | 950 | done = bf.processNextWeakRound(); |
| 950 | 951 | if (done) break; |
| … |
… |
|
| 1072 | 1073 | BellmanFord<StaticDigraph, LargeCostArcMap> bf(_sgr, _cost_map); |
| 1073 | 1074 | bf.init(0); |
| 1074 | 1075 | bool done = false; |
| 1075 | | int K = int(BF_HEURISTIC_BOUND_FACTOR * sqrt(_res_node_num)); |
| | 1076 | int K = int(BF_HEURISTIC_BOUND_FACTOR * |
| | 1077 | std::sqrt(double(_res_node_num))); |
| 1076 | 1078 | for (int i = 0; i < K && !done; ++i) |
| 1077 | 1079 | done = bf.processNextWeakRound(); |
| 1078 | 1080 | if (done) break; |