reset forest method
This commit is contained in:
parent
4c65b47f39
commit
433430f92c
10
graph.cpp
10
graph.cpp
@ -196,4 +196,14 @@ bool Graph::is_out_of_forest(const ED::NodeId id) const
|
||||
ear_or_root_neighbor(matched_neighbor(id)) == matched_neighbor(id);
|
||||
}
|
||||
|
||||
void Graph::reset_forest()
|
||||
{
|
||||
NodeId cur_id = 0;
|
||||
for(auto & node : _nodes) {
|
||||
node._ear_or_root_neighbor = cur_id;
|
||||
node._root_of_ear_component = cur_id;
|
||||
// Note that we do not change the matching itself here
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ED
|
||||
|
Loading…
Reference in New Issue
Block a user