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

Function PostProcess

src/contractor/graph_contractor.cpp:389–403  ·  view source on GitHub ↗

* @brief Post-process an independent node after contraction * * - Algo 2: Move I to their Level * * @param graph * @param v * @param node_data */

Source from the content-addressed store, hash-verified

387 * @param node_data
388 */
389void PostProcess(ContractorGraph &graph, const NodeID v, ContractorNodeData &node_data)
390{
391 ContractorNodeData::NodeDepth depth = node_data.depths[v] + 1;
392 for (const NodeID u : GetNeighbours(graph, v))
393 {
394 node_data.depths[u] = std::max(depth, node_data.depths[u]);
395
396 // "Irrespective of the direction flags, each edge (u, v) is stored only once,
397 // namely at the smaller node, which complies with the requirements of both
398 // forward and backward search (including the stall-on-demand technique)."
399 // [Geisberger2008]
400 // See also: self-loops
401 graph.DeleteEdgesTo(u, v);
402 }
403}
404
405/**
406 * @brief Inserts the edges produced by node contraction into the graph.

Callers 1

contractGraphFunction · 0.85

Calls 2

GetNeighboursFunction · 0.85
DeleteEdgesToMethod · 0.80

Tested by

no test coverage detected