MCPcopy Create free account
hub / github.com/comaps/comaps / GetNeighboringEdge

Method GetNeighboringEdge

libs/routing/index_graph.cpp:406–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void IndexGraph::GetNeighboringEdge(astar::VertexData<Segment, RouteWeight> const & fromVertexData, Segment const & to,
407 bool isOutgoing, SegmentEdgeListT & edges, Parents<Segment> const & parents,
408 bool useAccessConditional) const
409{
410 auto const & from = fromVertexData.m_vertex;
411 auto const & weightToFrom = fromVertexData.m_realDistance;
412
413 if (IsUTurn(from, to) && IsUTurnAndRestricted(from, to, isOutgoing))
414 return;
415
416 if (IsRestricted(from, from.GetFeatureId(), to.GetFeatureId(), isOutgoing, parents))
417 return;
418
419 if (IsAccessNoForSure(to.GetFeatureId(), weightToFrom, useAccessConditional))
420 return;
421
422 RoadPoint const rp = from.GetRoadPoint(isOutgoing);
423 if (IsAccessNoForSure(rp, weightToFrom, useAccessConditional))
424 return;
425
426 auto const weight = CalculateEdgeWeight(EdgeEstimator::Purpose::Weight, isOutgoing, from, to, weightToFrom);
427
428 edges.emplace_back(to, weight);
429}
430
431IndexGraph::PenaltyData IndexGraph::GetRoadPenaltyData(Segment const & segment) const
432{

Callers

nothing calls this directly

Calls 4

IsUTurnFunction · 0.85
GetRoadPointMethod · 0.80
GetFeatureIdMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected