Finding all disconnected subgraphs in a graph

后端 未结 7 2208
长发绾君心
长发绾君心 2020-12-07 22:57

I have a graph which contains an unknown number of disconnected subgraphs. What\'s a good algorithm (or Java library) to find them all?

7条回答
  •  隐瞒了意图╮
    2020-12-07 22:58

    JGraphT is a nice open source graphing library licensed under the LGPL license. I have used it in the past to deal with graphs and detecting cycles within the graphs. It is also fairly easy to use, and you can use JGraph to visualize the graphs.

提交回复
热议问题