[英]Java Jung Vertex Cuts in Graphs
I am trying to do vertex cuts on graphs in the JUNG graph package. 我试图在JUNG图形包中的图形上进行顶点切割。 This is best explained by the following pictures: 最佳解释如下图:
Now, I am going to cut vertex "c1" out of the graph: 现在,我要从图中切出顶点“c1”:
As you can see vertex "c1" has been removed from the graph, but so have the vertices "c2" and "c3" 正如您所见,顶点“c1”已从图中删除,但顶点为“c2”和“c3”
I want the vertices "c2" and "c3" to stay in the graph when I cut vertex "c1". 当切割顶点“c1”时,我希望顶点“c2”和“c3”保留在图形中。
I am using the removeVertex(V vertex)
function to remove vertex "c1" from the graph. 我正在使用removeVertex(V vertex)
函数从图中删除顶点“c1”。
您可以查看DelegateForest
及其removeVertex(vertex,boolean)
命令,该命令允许您指定是否删除以顶点为根的整个子树
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.