fix: recursive calls and return

This commit is contained in:
Maximilian Keßler 2023-11-05 13:46:29 +01:00
parent eb1e7e8dc8
commit 57ed5cf593
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -81,7 +81,8 @@ void maximum_matching_from_initial_matching(Graph & graph)
}
// Note that since this is tail-recursion, this will not generate
// new stack frames in OPT mode
maximum_matching(graph);
maximum_matching_from_initial_matching(graph);
return;
}
else
{
@ -160,7 +161,8 @@ void find_greedy_matching(Graph & graph)
}
Graph maximum_matching(Graph & graph) {
find_greedy_matching(graph);
//find_greedy_matching(graph);
graph.reset_matching();
maximum_matching_from_initial_matching(graph);
ED::Graph matching = ED::Graph(graph.num_nodes());