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

Function GetRegularEdges

tools/openlr/graph.cpp:20–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18using EdgeGetter = void (IRoadGraph::*)(geometry::PointWithAltitude const &, RoadGraphBase::EdgeListT &) const;
19
20void GetRegularEdges(geometry::PointWithAltitude const & junction, IRoadGraph const & graph,
21 EdgeGetter const edgeGetter, Graph::EdgeCacheT & cache, Graph::EdgeListT & edges)
22{
23 auto const it = cache.find(junction);
24 if (it == end(cache))
25 {
26 auto & es = cache[junction];
27 (graph.*edgeGetter)(junction, es);
28 edges.append(begin(es), end(es));
29 }
30 else
31 {
32 auto const & es = it->second;
33 edges.append(begin(es), end(es));
34 }
35}
36} // namespace
37
38Graph::Graph(DataSource & dataSource, shared_ptr<CarModelFactory> carModelFactory)

Callers 2

Calls 4

endFunction · 0.50
beginFunction · 0.50
findMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected