Make rounding when computing PhantomNode weight symmetric
Resolves a problem where the duration in forward and backward direction was slightly different.
This commit is contained in:
parent
3d4b39be7d
commit
95a584a30d
@ -400,7 +400,8 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
|
|||||||
}
|
}
|
||||||
if (data.reverse_segment_id.id != SPECIAL_SEGMENTID)
|
if (data.reverse_segment_id.id != SPECIAL_SEGMENTID)
|
||||||
{
|
{
|
||||||
reverse_weight *= 1.0 - ratio;
|
const EdgeWeight difference = reverse_weight * ratio;
|
||||||
|
reverse_weight -= difference;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto transformed = PhantomNodeWithDistance{PhantomNode{data,
|
auto transformed = PhantomNodeWithDistance{PhantomNode{data,
|
||||||
|
Loading…
Reference in New Issue
Block a user