fix the ascii art to make sense

This commit is contained in:
Kajari Ghosh 2018-04-25 11:08:22 -04:00 committed by Patrick Niklaus
parent b0f2ef287e
commit 1bc3ff6491

View File

@ -286,12 +286,13 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
} }
else 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()) if (target_phantom.GetForwardDistance() > source_phantom.GetForwardDistance())
{ {
// ............ <-- calculateEGBAnnotation returns distance from 0 to 3 // --------->t <-- offsets
// ->s -->t <-- offsets // ->s <-- subtract source offset from target offset
// --..........++++ <-- subtract source offset and add target offset // ......... <-- want this distance as result
// .............. <-- want this distance as result
// 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();
@ -299,10 +300,9 @@ void calculateDistances(typename SearchEngineData<ch::Algorithm>::ManyToManyQuer
} }
else else
{ {
// ............ <-- calculateEGBAnnotation returns distance from 0 to 3 // s<--- <-- offsets
// s<--------<--t <-- GetReverseDistance() returns this offset // t<--------- <-- subtract source offset from target offset
// ---.........++++ <-- subtract source offset and add target offset // ...... <-- want this distance as result
// ............. <-- want this distance as result
// 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();