简体   繁体   中英

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. 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. (BicomponentClusterer is not correct for this case if I understood your question correctly.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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