MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / insertViaNode

Function insertViaNode

src/extractor/restriction_graph.cpp:60–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60RestrictionID insertViaNode(RestrictionGraph &rg, NodeID from, NodeID to)
61{
62 auto new_via_node_idx = rg.nodes.size();
63 rg.nodes.push_back(RestrictionNode{rg.restrictions.size(), 0, rg.edges.size(), 0});
64 rg.via_edge_to_node.insert({{from, to}, new_via_node_idx});
65 return new_via_node_idx;
66}
67
68// pathBuilder builds the prefix tree structure that is used to first insert turn restrictions
69// into the graph.

Callers 1

nextMethod · 0.85

Calls 3

insertMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected