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

Method IsJointOrEnd

libs/routing/index_graph.cpp:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool IndexGraph::IsJointOrEnd(Segment const & segment, bool fromStart) const
65{
66 if (IsJoint(segment.GetRoadPoint(fromStart)))
67 return true;
68
69 // For features, that ends out of mwm. In this case |m_graph.IsJoint| returns false, but we should
70 // think, that it's Joint anyway.
71 uint32_t const pointId = segment.GetPointId(fromStart);
72 if (pointId == 0)
73 return true;
74
75 uint32_t const pointsNumber = GetRoadGeometry(segment.GetFeatureId()).GetPointsCount();
76 return pointId + 1 == pointsNumber;
77}
78
79void IndexGraph::GetEdgeList(astar::VertexData<Segment, RouteWeight> const & vertexData, bool isOutgoing,
80 bool useRoutingOptions, SegmentEdgeListT & edges, Parents<Segment> const & parents) const

Callers

nothing calls this directly

Calls 5

IsJointFunction · 0.85
GetRoadPointMethod · 0.80
GetPointIdMethod · 0.45
GetPointsCountMethod · 0.45
GetFeatureIdMethod · 0.45

Tested by

no test coverage detected