什么是图的吸引子图?
Networkx has an algorithm for this.但我无法理解这是因为:
>>> g.edges()
[(0, 1), (1, 2), (2, 3), (2, 5), (3, 4)]
>>> for l in nx.algorithms.components.attracting.attracting_component_subgraphs(g):
... print l.edges()
... print l.nodes()
...
[]
[4]
[]
[5]
吸引组件的定义在
nx.algorithms.components.attracting_components
的文档中提供。在http://networkx.lanl.gov/reference/generated/networkx.algorithms.components.attracting.attracting_components.html#networkx.algorithms.components.attracting.attracting_components
因此,一个吸引的组件子图将是一个节点列表,这些节点诱导满足此定义的子图。在
相关问题 更多 >
编程相关推荐