Skip to content

Commit

Permalink
fix the ascii art to make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshkaj committed Apr 25, 2018
1 parent 2a3c72c commit fdc5920
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/engine/routing_algorithms/many_to_many_ch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,23 +286,23 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
}
else
{
// there is no shortcut to unpack. source and target are on the same EBG Node.
// if the offset of the target is greater than the offset of the source, subtract it
if (target_phantom.GetForwardDistance() > source_phantom.GetForwardDistance())
{
// ............ <-- calculateEGBAnnotation returns distance from 0 to 3
// ->s -->t <-- offsets
// --..........++++ <-- subtract source offset and add target offset
// .............. <-- want this distance as result
// --------->t <-- offsets
// ->s <-- subtract source offset from target offset
// ......... <-- want this distance as result
// entry 0---1---2---3--- <-- 3 is exit node
EdgeDistance offset =
target_phantom.GetForwardDistance() - source_phantom.GetForwardDistance();
distances_table[row_index * number_of_targets + column_index] = offset;
}
else
{
// ............ <-- calculateEGBAnnotation returns distance from 0 to 3
// s<--------<--t <-- GetReverseDistance() returns this offset
// ---.........++++ <-- subtract source offset and add target offset
// ............. <-- want this distance as result
// s<--- <-- offsets
// t<--------- <-- subtract source offset from target offset
// ...... <-- want this distance as result
// entry 0---1---2---3--- <-- 3 is exit node
EdgeDistance offset =
target_phantom.GetReverseDistance() - source_phantom.GetReverseDistance();
Expand Down

0 comments on commit fdc5920

Please sign in to comment.