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

Function UpdateNeighbourPriorities

src/contractor/graph_contractor.cpp:435–449  ·  view source on GitHub ↗

* @brief Recalculate the priorities of all neighbouring nodes. * * @param graph * @param v The node id * @param data * @param node_data */

Source from the content-addressed store, hash-verified

433 * @param node_data
434 */
435void UpdateNeighbourPriorities(const ContractorGraph &graph,
436 const NodeID v,
437 ContractorNodeData &node_data,
438 ThreadData &thread_data)
439{
440 for (const NodeID u : GetNeighbours(graph, v))
441 {
442 if (node_data.is_core[u] && node_data.is_contractible[u])
443 {
444 ContractionStats stats;
445 ContractNode<true>(graph, u, thread_data, node_data, nullptr, &stats);
446 node_data.priorities[u] = EvaluateNodePriority(stats, node_data.depths[u]);
447 }
448 }
449}
450
451/**
452 * @brief Test if a node is independent.

Callers 1

contractGraphFunction · 0.85

Calls 2

GetNeighboursFunction · 0.85
EvaluateNodePriorityFunction · 0.85

Tested by

no test coverage detected