iterate over outer verticse, not out-of-forest
This commit is contained in:
parent
229250acca
commit
2cd6dc2c1d
1 changed files with 1 additions and 3 deletions
|
@ -30,13 +30,11 @@ std::vector<NodeId> path_to_forest_root(Graph const & graph, NodeId id)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Graph maximum_matching_from_initial_matching(Graph & graph)
|
Graph maximum_matching_from_initial_matching(Graph & graph)
|
||||||
{
|
{
|
||||||
graph.reset_forest();
|
graph.reset_forest();
|
||||||
for(NodeId id = 0; id < graph.num_nodes(); ++id) {
|
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())
|
for(NodeId neighbor_id : graph.node(id).neighbors())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue