powsybl-core
powsybl-core copied to clipboard
Traverser traverses all edges
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
Does this PR already have an issue describing the problem ? No
What kind of change does this PR introduce? Bug fix
What is the current behavior?
According to javadoc UndirectedGraphImpl::traverse(int v, Traverser t)
should traverse the entire graph. It traverses all the vertices but not all the edges.
What is the new behavior (if this is a feature change)?
UndirectedGraphImpl::traverse(int v, Traverser t)
traverses all the vertices and all the edges of the graph.
Does this PR introduce a breaking change or deprecate an API? No
Needs to be discussed!
Indeed, if we want all the edges to be traversed but to be traversed each only once, we need a boolean array for keeping track of edges encountered.