Skip to content

Commit

Permalink
update distance table entries only if larger than 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Nov 13, 2014
1 parent 2cc8ae8 commit bec585e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RoutingAlgorithms/ManyToManyRouting.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ template <class DataFacadeT> class ManyToManyRouting final : public BasicRouting
(*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);
Expand Down

0 comments on commit bec585e

Please sign in to comment.