update distance table entries only if larger than 0.

This commit is contained in:
Dennis Luxen 2014-11-13 13:45:21 +01:00
parent 2cc8ae875a
commit bec585e382

View File

@ -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);