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

Method AddFakeEdges

libs/routing/road_graph.cpp:243–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void IRoadGraph::AddFakeEdges(JunctionPointT const & junction, vector<pair<Edge, JunctionPointT>> const & vicinity)
244{
245 for (auto const & v : vicinity)
246 {
247 Edge const & ab = v.first;
248 JunctionPointT const & p = v.second;
249
250 vector<Edge> edges;
251 SplitEdge(ab, p, edges);
252
253 edges.push_back(Edge::MakeFake(junction, p));
254 edges.push_back(Edge::MakeFake(p, junction));
255
256 ForEachFakeEdge([&](Edge const & uv)
257 {
258 if (OnEdge(p, uv))
259 SplitEdge(uv, p, edges);
260 });
261
262 for (auto const & uv : edges)
263 {
264 AddOutgoingFakeEdge(uv);
265 AddIngoingFakeEdge(uv);
266 }
267 }
268}
269
270void IRoadGraph::AddOutgoingFakeEdge(Edge const & e)
271{

Callers 2

InitMethod · 0.45
UNIT_TESTFunction · 0.45

Calls 3

SplitEdgeFunction · 0.85
OnEdgeFunction · 0.85
push_backMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.36