def c_c(graph_file):
g = nx.read_edgelist(graph_file,create_using = nx.Graph(),nodetype = int)
graphs = nx.connected_component_subgraphs(g)
for graph in graphs:
print graph.number_of_nodes(),graph.number_of_edges()
print len(graphs)
s_c_c.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录