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

Method RemapIfRestrictionStart

src/extractor/way_restriction_map.cpp:79–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79NodeID WayRestrictionMap::RemapIfRestrictionStart(const NodeID edge_based_node,
80 const NodeID node_based_from,
81 const NodeID node_based_via,
82 const NodeID node_based_to,
83 const NodeID number_of_edge_based_nodes) const
84{
85
86 auto restriction_it =
87 restriction_graph.start_edge_to_node.find({node_based_from, node_based_via});
88 if (restriction_it != restriction_graph.start_edge_to_node.end())
89 {
90 for (const auto &edge : restriction_graph.GetEdges(restriction_it->second))
91 {
92 if (edge.node_based_to == node_based_to)
93 {
94 return number_of_edge_based_nodes - NumberOfDuplicatedNodes() + edge.target;
95 }
96 }
97 }
98 return edge_based_node;
99}
100
101NodeID WayRestrictionMap::RemapIfRestrictionVia(const NodeID edge_based_target_node,
102 const NodeID edge_based_via_node,

Callers 1

Calls 2

GetEdgesMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected