1.1 --- a/lemon/nearest_neighbor_tsp.h Sun Aug 11 22:32:16 2013 +0200
1.2 +++ b/lemon/nearest_neighbor_tsp.h Wed Sep 25 11:32:41 2013 +0200
1.3 @@ -115,7 +115,7 @@
1.4 if (min_edge1 == INVALID) {
1.5 for (IncEdgeIt e(_gr, n1); e != INVALID; ++e) {
1.6 if (!used[_gr.runningNode(e)] &&
1.7 - (_cost[e] < _cost[min_edge1] || min_edge1 == INVALID)) {
1.8 + (min_edge1 == INVALID || _cost[e] < _cost[min_edge1])) {
1.9 min_edge1 = e;
1.10 }
1.11 }
1.12 @@ -124,7 +124,7 @@
1.13 if (min_edge2 == INVALID) {
1.14 for (IncEdgeIt e(_gr, n2); e != INVALID; ++e) {
1.15 if (!used[_gr.runningNode(e)] &&
1.16 - (_cost[e] < _cost[min_edge2] || min_edge2 == INVALID)) {
1.17 + (min_edge2 == INVALID||_cost[e] < _cost[min_edge2])) {
1.18 min_edge2 = e;
1.19 }
1.20 }