preferential_attachment_graph#
- preferential_attachment_graph(aseq, p, create_using=None, seed=None)[源]#
从给定的单一度序列创建一个具有优先连接模型的二分图。
该图由两个划分组成。集合 A 包含节点 0 到 (len(aseq) - 1),集合 B 包含从节点 len(aseq) 开始的节点。集合 B 中的节点数量是随机的。
- 参数:
- aseq列表
节点集合 A 的度序列。
- p浮点数
添加新底部节点的概率。
- create_usingNetworkX 图实例,可选
返回此类型的图。
- seed整数、random_state 或 None(默认)
随机数生成状态的指示符。参见随机性。
注意
节点被赋予属性“bipartite”,其值为 0 或 1,以指示该节点属于哪个二分集合。
此函数未导入到主命名空间。要使用它,请使用 nx.bipartite.preferential_attachment_graph
参考文献
[1]Guillaume, J.L. and Latapy, M., Bipartite graphs as models of complex networks. Physica A: Statistical Mechanics and its Applications, 2006, 371(2), pp.795-813.
[2]Jean-Loup Guillaume and Matthieu Latapy, Bipartite structure of all complex networks, Inf. Process. Lett. 90, 2004, pg. 215-221 https://doi.org/10.1016/j.ipl.2004.03.007