gpt4 book ai didi

python - 什么是吸引子图?

转载 作者:太空宇宙 更新时间:2023-11-03 13:23:09 27 4
gpt4 key购买 nike

什么是图的吸引子图?
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 的文档中提供了吸引组件的定义。

An attracting component in a directed graph is a strongly connected component with the property that a random walker on the graph will never leave the component, once it enters the component.

The nodes in attracting components can also be thought of as recurrent nodes. If a random walker enters the attractor containing the node, then the node will be visited infinitely often.

http://networkx.lanl.gov/reference/generated/networkx.algorithms.components.attracting.attracting_components.html#networkx.algorithms.components.attracting.attracting_components

因此,一个吸引组件子图将是一个节点列表,这些节点诱导满足此定义的子图。

关于python - 什么是吸引子图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7097627/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com