iterate over outer verticse, not out-of-forest

This commit is contained in:
Maximilian Keßler 2023-11-05 12:38:14 +01:00
parent 229250acca
commit 2cd6dc2c1d
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -30,13 +30,11 @@ std::vector<NodeId> path_to_forest_root(Graph const & graph, NodeId id)
return retval;
}
Graph maximum_matching_from_initial_matching(Graph & graph)
{
graph.reset_forest();
for(NodeId id = 0; id < graph.num_nodes(); ++id) {
if (graph.is_out_of_forest(id))
if (graph.is_outer(id))
{
for(NodeId neighbor_id : graph.node(id).neighbors())
{