diff --git a/edmonds.cpp b/edmonds.cpp index 83449be..d69f9f9 100644 --- a/edmonds.cpp +++ b/edmonds.cpp @@ -31,7 +31,8 @@ std::vector path_to_forest_root(Graph const & graph, NodeId id) } -Graph maximum_matching(Graph & graph) + +Graph maximum_matching_from_initial_matching(Graph & graph) { graph.reset_forest(); for(NodeId id = 0; id < graph.num_nodes(); ++id) { @@ -119,4 +120,10 @@ Graph maximum_matching(Graph & graph) } } }; + +Graph maximum_matching(Graph & graph) { + graph.reset_matching(); + return maximum_matching_from_initial_matching(graph); +} + }