I have build a network where the Gaphs.hasCycle()
returns false which has a single starting node and models a tree. The graph however does allow parallel edges between nodes.
Now I would like to remove an edge in that graph, and if the edge is the only edge connecting two nodes I would like the whole branch to be removed. Note, the graph does allow parallel edges.
Java docs here do not provide much information on what would happen in a scenario. I would like to ensure there are no stray / unconnected branches in my graph following the removal. Do I need to take extra steps to ensure that?