python组件是什么_在Python中什么是吸引组件子图?

什么是图形的吸引组件子图?

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

因此,吸引组件子图将是引起满足该定义的子图的节点列表.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值