remove possibility to choose algorithm but only use brute force and farthest insertion

This commit is contained in:
Huyen Chau Nguyen
2015-08-20 16:42:50 +02:00
parent e6eea67eeb
commit e773a80b06
5 changed files with 7 additions and 27 deletions
+3 -3
View File
@@ -55,11 +55,11 @@ namespace trip
// computes the distance of a given permutation
EdgeWeight ReturnDistance(const DistTableWrapper<EdgeWeight> & dist_table,
const std::vector<NodeID> & location_order,
const EdgeWeight min_route_dist,
const std::size_t component_size) {
const EdgeWeight & min_route_dist,
const std::size_t & component_size) {
EdgeWeight route_dist = 0;
std::size_t i = 0;
while (i < location_order.size()) {
while (i < location_order.size() && (route_dist < min_route_dist)) {
route_dist += dist_table(location_order[i], location_order[(i+1) % component_size]);
++i;
}