Changeset 1101:15e233f588da in lemon-main
- Timestamp:
- 09/25/13 11:15:56 (11 years ago)
- Branch:
- default
- Children:
- 1104:a78e5b779b69, 1128:ee96cd1cad8a
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/nearest_neighbor_tsp.h
r1092 r1101 116 116 for (IncEdgeIt e(_gr, n1); e != INVALID; ++e) { 117 117 if (!used[_gr.runningNode(e)] && 118 ( _cost[e] < _cost[min_edge1] || min_edge1 == INVALID)) {118 (min_edge1 == INVALID || _cost[e] < _cost[min_edge1])) { 119 119 min_edge1 = e; 120 120 } … … 125 125 for (IncEdgeIt e(_gr, n2); e != INVALID; ++e) { 126 126 if (!used[_gr.runningNode(e)] && 127 ( _cost[e] < _cost[min_edge2] || min_edge2 == INVALID)) {127 (min_edge2 == INVALID||_cost[e] < _cost[min_edge2])) { 128 128 min_edge2 = e; 129 129 }
Note: See TracChangeset
for help on using the changeset viewer.