fix the offset case when there is no packed path to unpack

This commit is contained in:
Kajari Ghosh 2018-04-24 18:46:37 -04:00 committed by Patrick Niklaus
parent 16f53ff81a
commit b0f2ef287e

View File

@ -295,7 +295,7 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
// entry 0---1---2---3--- <-- 3 is exit node // entry 0---1---2---3--- <-- 3 is exit node
EdgeDistance offset = EdgeDistance offset =
target_phantom.GetForwardDistance() - source_phantom.GetForwardDistance(); target_phantom.GetForwardDistance() - source_phantom.GetForwardDistance();
distances_table[row_index * number_of_targets + column_index] += offset; distances_table[row_index * number_of_targets + column_index] = offset;
} }
else else
{ {
@ -306,7 +306,7 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
// entry 0---1---2---3--- <-- 3 is exit node // entry 0---1---2---3--- <-- 3 is exit node
EdgeDistance offset = EdgeDistance offset =
target_phantom.GetReverseDistance() - source_phantom.GetReverseDistance(); target_phantom.GetReverseDistance() - source_phantom.GetReverseDistance();
distances_table[row_index * number_of_targets + column_index] += offset; distances_table[row_index * number_of_targets + column_index] = offset;
} }
} }
packed_leg.clear(); packed_leg.clear();