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

Function unpackEdge

src/engine/routing_algorithms/routing_base_ch.cpp:14–26  ·  view source on GitHub ↗

* Unpacks a single edge (NodeID->NodeID) from the CH graph down to it's original non-shortcut * route. * @param from the node the CH edge starts at * @param to the node the CH edge finishes at * @param unpacked_path the sequence of original NodeIDs that make up the expanded CH edge */

Source from the content-addressed store, hash-verified

12 * @param unpacked_path the sequence of original NodeIDs that make up the expanded CH edge
13 */
14void unpackEdge(const DataFacade<Algorithm> &facade,
15 const NodeID from,
16 const NodeID to,
17 std::vector<NodeID> &unpacked_path)
18{
19 std::array<NodeID, 2> path{{from, to}};
20 unpackPath(facade,
21 path.begin(),
22 path.end(),
23 [&unpacked_path](NodeID first, NodeID /* second */, const auto & /* data */)
24 { unpacked_path.emplace_back(first); });
25 unpacked_path.emplace_back(to);
26}
27
28void retrievePackedPathFromHeap(const SearchEngineData<Algorithm>::QueryHeap &forward_heap,
29 const SearchEngineData<Algorithm>::QueryHeap &reverse_heap,

Callers 1

Calls 4

unpackPathFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected