further splitup

This commit is contained in:
Maximilian Keßler 2023-11-06 12:44:21 +01:00
parent 47437f5a2f
commit 391e0761a9
Signed by: max
GPG Key ID: BCC5A619923C0BA5

View File

@ -179,6 +179,19 @@ void update_phi_along_blossom_paths(Graph & graph, std::vector<NodeId> 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<NodeId> const & x_path, std::vector<NodeId> const & y_path,
std::tuple<NodeId, size_type, size_type> const & blossom_root_description,
@ -207,15 +220,7 @@ void update_rho(Graph & graph, std::vector<NodeId> const & x_path, std::vector<N
outer_unvisited_nodes.push(y_path[i]);
}
}
// 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;
}
}
contract_rho(graph, blossom_root_id);
}
__attribute__((noinline))