* @brief Recalculate the priorities of all neighbouring nodes. * * @param graph * @param v The node id * @param data * @param node_data */
| 433 | * @param node_data |
| 434 | */ |
| 435 | void 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. |
no test coverage detected