fix: recursive calls and return
This commit is contained in:
parent
eb1e7e8dc8
commit
57ed5cf593
1 changed files with 4 additions and 2 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue