From 93e53ec6128c9ce4b0aa9cd2f0c4aee13b69319c Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Thu, 19 Jun 2014 19:52:05 +0200 Subject: [PATCH] fix comparison to accept 0 distance results in distance table --- RoutingAlgorithms/ManyToManyRouting.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RoutingAlgorithms/ManyToManyRouting.h b/RoutingAlgorithms/ManyToManyRouting.h index b5cb7958c..8dfc6f0c5 100644 --- a/RoutingAlgorithms/ManyToManyRouting.h +++ b/RoutingAlgorithms/ManyToManyRouting.h @@ -155,7 +155,7 @@ template class ManyToManyRouting : public BasicRoutingInterf (*result_table)[source_id * number_of_locations + target_id]; // check if new distance is better const EdgeWeight new_distance = source_distance + target_distance; - if (new_distance > 0 && new_distance < current_distance) + if (new_distance >= 0 && new_distance < current_distance) { (*result_table)[source_id * number_of_locations + target_id] = (source_distance + target_distance);