简体   繁体   English

如何找到两个顶点是否与Jung Framework连接?

[英]how to find if two vertices are connected with Jung Framework?

I want to know how to check if two vertices are connected in a graph using Jung Framework. 我想知道如何使用Jung Framework检查图形中是否连接了两个顶点。 Thanks. 谢谢。

If the graph is undirected (you haven't specified) or if you don't care about edge direction, use WeakComponentClusterer to split the graph into its (weakly) connected components, and then check to see if the vertices are in the same component. 如果图形是无向的(未指定),或者您不关心边缘方向,请使用WeakComponentClusterer将图形拆分为(弱)连接的组件,然后检查顶点是否在同一组件中。 (BicomponentClusterer is not correct for this case if I understood your question correctly.) (如果我正确理解了您的问题,BicomponentClusterer在这种情况下是不正确的。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM