I am trying to do vertex cuts on graphs in the JUNG graph package. This is best explained by the following pictures:
Now, I am going to cut vertex "c1" out of the graph:
As you can see vertex "c1" has been removed from the graph, but so have the vertices "c2" and "c3"
I want the vertices "c2" and "c3" to stay in the graph when I cut vertex "c1".
I am using the removeVertex(V vertex)
function to remove vertex "c1" from the graph.
You could take a look at DelegateForest
and its removeVertex(vertex,boolean)
command which lets you specify whether or not to remove the entire subtree rooted in your vertex