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

Method GetEdges

libs/routing/index_road_graph.cpp:114–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void IndexRoadGraph::GetEdges(geometry::PointWithAltitude const & junction, bool isOutgoing, EdgeListT & edges) const
115{
116 edges.clear();
117
118 for (Segment const & segment : GetSegments(junction, isOutgoing))
119 {
120 IndexGraphStarter::EdgeListT tmpEdges;
121 m_starter.GetEdgesList(segment, isOutgoing, tmpEdges);
122
123 for (SegmentEdge const & segmentEdge : tmpEdges)
124 {
125 Segment const & segment = segmentEdge.GetTarget();
126 if (IndexGraphStarter::IsFakeSegment(segment))
127 continue;
128
129 edges.push_back(Edge::MakeReal({m_dataSource.GetMwmId(segment.GetMwmId()), segment.GetFeatureId()},
130 segment.IsForward(), segment.GetSegmentIdx(),
131 m_starter.GetJunction(segment, false /* front */).ToPointWithAltitude(),
132 m_starter.GetJunction(segment, true /* front */).ToPointWithAltitude()));
133 }
134 }
135}
136
137IndexRoadGraph::SegmentListT const & IndexRoadGraph::GetSegments(geometry::PointWithAltitude const & junction,
138 bool isOutgoing) const

Callers 9

TestGraphFunction · 0.45
TestEqualFunction · 0.45
SplitEdgesMethod · 0.45
DoMethod · 0.45
GetTransitEdgesMethod · 0.45
FillMethod · 0.45
GetEdgesListMethod · 0.45
ConstructFakeGraphFunction · 0.45
UNIT_TESTFunction · 0.45

Calls 10

GetSegmentsFunction · 0.85
GetTargetMethod · 0.80
ToPointWithAltitudeMethod · 0.80
clearMethod · 0.45
GetEdgesListMethod · 0.45
push_backMethod · 0.45
GetMwmIdMethod · 0.45
GetFeatureIdMethod · 0.45
IsForwardMethod · 0.45
GetSegmentIdxMethod · 0.45

Tested by 4

TestGraphFunction · 0.36
TestEqualFunction · 0.36
ConstructFakeGraphFunction · 0.36
UNIT_TESTFunction · 0.36