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:
Patrick Niklaus 2016-11-16 00:05:08 +00:00 committed by Patrick Niklaus
parent 3d4b39be7d
commit 95a584a30d

View File

@ -400,7 +400,8 @@ template <typename RTreeT, typename DataFacadeT> class GeospatialQuery
}
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,