fix comparison to accept 0 distance results in distance table
This commit is contained in:
parent
ea8319e2b9
commit
93e53ec612
@ -155,7 +155,7 @@ template <class DataFacadeT> class ManyToManyRouting : public BasicRoutingInterf
|
|||||||
(*result_table)[source_id * number_of_locations + target_id];
|
(*result_table)[source_id * number_of_locations + target_id];
|
||||||
// check if new distance is better
|
// check if new distance is better
|
||||||
const EdgeWeight new_distance = source_distance + target_distance;
|
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] =
|
(*result_table)[source_id * number_of_locations + target_id] =
|
||||||
(source_distance + target_distance);
|
(source_distance + target_distance);
|
||||||
|
Loading…
Reference in New Issue
Block a user