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