From 391e0761a9a33074fa2d5f16f5446f70a638a97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 6 Nov 2023 12:44:21 +0100 Subject: [PATCH] further splitup --- src/edmonds.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/edmonds.cpp b/src/edmonds.cpp index 29ae7ea..9e464ac 100644 --- a/src/edmonds.cpp +++ b/src/edmonds.cpp @@ -179,6 +179,19 @@ void update_phi_along_blossom_paths(Graph & graph, std::vector const & x } } +__attribute__((noinline)) +void contract_rho(Graph & graph, NodeId blossom_root_id) +{ + // Iterating over whole graph. + for (NodeId node_id = 0; node_id < graph.num_nodes(); ++node_id) + { + if (graph.rho(graph.rho(node_id)) == blossom_root_id) + { + graph.node(node_id).rho = blossom_root_id; + } + } +} + __attribute__((noinline)) void update_rho(Graph & graph, std::vector const & x_path, std::vector const & y_path, std::tuple const & blossom_root_description, @@ -207,15 +220,7 @@ void update_rho(Graph & graph, std::vector const & x_path, std::vector