<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.swarma.org/index.php?action=history&amp;feed=atom&amp;title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B</id>
	<title>BA网络模型 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.swarma.org/index.php?action=history&amp;feed=atom&amp;title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B"/>
	<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;action=history"/>
	<updated>2026-11-03T01:07:29Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=34786&amp;oldid=prev</id>
		<title>13944556914：/* References */</title>
		<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=34786&amp;oldid=prev"/>
		<updated>2024-05-21T08:43:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;References&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2024年5月21日 (二) 08:43的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l131&quot; &gt;第131行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第131行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;复杂系统]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;待润色&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[category:旧词条迁移&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>13944556914</name></author>
	</entry>
	<entry>
		<id>https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=15205&amp;oldid=prev</id>
		<title>2020年10月14日 (三) 14:50 思无涯咿呀咿呀</title>
		<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=15205&amp;oldid=prev"/>
		<updated>2020-10-14T14:50:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2020年10月14日 (三) 14:50的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l132&quot; &gt;第132行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第132行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:复杂系统]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:复杂系统]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:旧词条迁移]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>思无涯咿呀咿呀</name></author>
	</entry>
	<entry>
		<id>https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=5511&amp;oldid=prev</id>
		<title>18621066378：导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=5511&amp;oldid=prev"/>
		<updated>2020-04-28T01:46:28Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2020年4月28日 (二) 01:46的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>18621066378</name></author>
	</entry>
	<entry>
		<id>https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=5510&amp;oldid=prev</id>
		<title>2018年11月2日 (五) 04:02 http://c2.com/cgi/wiki?$1&gt;Moonscar</title>
		<link rel="alternate" type="text/html" href="https://wiki.swarma.org/index.php?title=BA%E7%BD%91%E7%BB%9C%E6%A8%A1%E5%9E%8B&amp;diff=5510&amp;oldid=prev"/>
		<updated>2018-11-02T04:02:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=BA Model 的平均场理论=&lt;br /&gt;
Barabási, Albert-László; Albert, Réka. (October 15, 1999). &amp;quot;Emergence of scaling in random networks&amp;quot;. Science. 286 (5439): 509–512. arXiv:cond-mat/9910332 Freely accessible. Bibcode:1999Sci...286..509B. &amp;lt;ref&amp;gt; Barabási, Albert-László; Albert, Réka. (October 15, 1999). &amp;quot;Emergence of scaling in random networks&amp;quot;. Science. 286 (5439): 509–512. arXiv:cond-mat/9910332 Freely accessible. Bibcode:1999Sci...286..509B. &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
R. Albert, A.-L. Barabási. Statistical mechanics of complex networks. Reviews of Modern Physics 74, 47-97 (2002) &amp;lt;ref&amp;gt;R. Albert, A.-L. Barabási. Statistical mechanics of complex networks. Reviews of Modern Physics 74, 47-97 (2002)&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
H. Jeong - Z. Néda  - A. L. Barabási (2003)  Measuring preferential attachment in evolving networks. Europhys. Lett., 61 (4), p. 567  &amp;lt;ref&amp;gt;H. Jeong - Z. Néda  - A. L. Barabási (2003)  Measuring preferential attachment in evolving networks. Europhys. Lett., 61 (4), p. 567 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==模型设定==&lt;br /&gt;
* 初始状态有&amp;lt;math&amp;gt;m_0&amp;lt;/math&amp;gt;个节点&lt;br /&gt;
* 1. 增长原则：每次加入一个节点i （加入时间记为&amp;lt;math&amp;gt;t_i&amp;lt;/math&amp;gt;）, 每个节点的加入带来m条边，2m个度的增加&lt;br /&gt;
** 其中老节点分到的度数是m，新加入的那一个节点分到的度数为m&lt;br /&gt;
** 那么到时间t的时候，网络的总节点数是&amp;lt;math&amp;gt;m_0 + t&amp;lt;/math&amp;gt;，网络的总度数为&amp;lt;math&amp;gt;2mt&amp;lt;/math&amp;gt;。&lt;br /&gt;
* 2. 优先链接原则：每一次从m条边中占有一条边的概率正比于节点的度&amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;&lt;br /&gt;
** 那么显然，加入的越早（&amp;lt;math&amp;gt;t_i&amp;lt;/math&amp;gt;越小）越容易获得更多的链接数。&lt;br /&gt;
** 从时间0开始，每一个时间步系统中的节点度&amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;是不断增加的。&lt;br /&gt;
&lt;br /&gt;
==度的增长/时间依赖性==&lt;br /&gt;
&amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;在一个时间步获得一个度的概率表示为&amp;lt;math&amp;gt;\prod (k_i) &amp;lt;/math&amp;gt;， 那么有：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\prod (k_i)  = \frac{k_i}{\sum k_i} =  \frac{k_i}{2mt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
一个时间步，&amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;随t的变化率可以表达为：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial k_i}{\partial t} = \Delta k \prod (k_i) = m \frac{k_i}{2mt} = \frac{k_i}{2t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\partial k_i}{k_i} = \frac{\partial t}{2t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \frac{1}{k_i} d k_i = \int \frac{1}{2t} dt&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
积分结果为：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k_i =(Ct) ^ {0.5}&amp;lt;/math&amp;gt; 公式（1）&lt;br /&gt;
&lt;br /&gt;
此时，根据模型的初始条件，每个新加入节点获得的度是m：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k_i(t_i) = m &amp;lt;/math&amp;gt; 代入公式（1）&lt;br /&gt;
&lt;br /&gt;
可以得到&amp;lt;math&amp;gt;C = m^{2}/t_i&amp;lt;/math&amp;gt; 公式（2）&lt;br /&gt;
&lt;br /&gt;
代入公式（1），得到：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;k_i = m (\frac{t}{t_i})^{0.5}&amp;lt;/math&amp;gt;  公式（3）&lt;br /&gt;
&lt;br /&gt;
对于一个节点i，其加入网络的时间&amp;lt;math&amp;gt;t_i&amp;lt;/math&amp;gt;是固定的，我们可以观察其度&amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;随着时间的幂律关系。&lt;br /&gt;
&lt;br /&gt;
H. Jeong - Z. Néda  - A. L. Barabási (2003)  Measuring preferential attachment in evolving networks. Europhys. Lett., 61 (4), p. 567  &amp;lt;ref&amp;gt;H. Jeong - Z. Néda  - A. L. Barabási (2003)  Measuring preferential attachment in evolving networks. Europhys. Lett., 61 (4), p. 567 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==累积概率分布==&lt;br /&gt;
&lt;br /&gt;
当我们思考一个累积概率分布的时候，我们想要的是&amp;lt;math&amp;gt;k_i(t) &amp;lt; k&amp;lt;/math&amp;gt;的概率：&amp;lt;math&amp;gt;P(k_i(t) &amp;lt; k) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
由公式（3），可以知道：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(k_i(t) &amp;lt; k)  = P( m (\frac{t}{t_i})^{0.5}  &amp;lt; k ) = P(  t_i &amp;gt; \frac{m^2 t}{k^2}  ) = 1 - P(t_i \leqslant \frac{m^2 t}{k^2} )&amp;lt;/math&amp;gt;  公式（4）&lt;br /&gt;
&lt;br /&gt;
在初始状态&amp;lt;math&amp;gt; t = 0&amp;lt;/math&amp;gt;, 有&amp;lt;math&amp;gt;m_0&amp;lt;/math&amp;gt;个节点，那么&amp;lt;math&amp;gt;t_{m_0} = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
假设我们将节点加入的时间步是均匀的，那么&amp;lt;math&amp;gt;t_i&amp;lt;/math&amp;gt;的概率是一个常数：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(t_i) = \frac{1}{m_0 + t}&amp;lt;/math&amp;gt; 公式（5）&lt;br /&gt;
&lt;br /&gt;
===均匀分布的性质===&lt;br /&gt;
* 设连续型随机变量X的概率密度函数为 f(x)=1/(b-a)，a≤x≤b, 则称随机变量X服从[a,b]上的均匀分布，记为X~U[a,b]。&lt;br /&gt;
* 若[x1,x2]是[a,b]的任一子区间，则 P{x_1≤x≤x_2}=(x_2-x_1)/(b-a).&lt;br /&gt;
&lt;br /&gt;
根据均匀分布的性质，将公式（5）代入公式（4）得到：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P(k_i(t) &amp;lt; k)  = 1-  \frac{m^2 t}{k^2} P(t_i)  =  1 - \frac{m^2 t}{k^2 (m_0 + t)} &amp;lt;/math&amp;gt;  公式（6）&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
对累积概率函数求微分，就可以到达概率密度函数:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;P( k ) = \frac{\partial P(k_i(t) &amp;lt; k)}{\partial k} = \frac{2m^2 t}{m_0 + k} \frac{1}{k^3}&amp;lt;/math&amp;gt;   公式（7）&lt;br /&gt;
&lt;br /&gt;
也就是说：&amp;lt;math&amp;gt;\gamma = 3&amp;lt;/math&amp;gt;, 与m无关。&lt;br /&gt;
&lt;br /&gt;
= Implementation =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def barabasi_albert_graph(n, m, seed=None):&lt;br /&gt;
    if m &amp;lt; 1 or m &amp;gt;= n:&lt;br /&gt;
        return []&lt;br /&gt;
&lt;br /&gt;
    if seed is not None:&lt;br /&gt;
        random.seed(seed)&lt;br /&gt;
    &lt;br /&gt;
    plot_G = nx.empty_graph(n)&lt;br /&gt;
    &lt;br /&gt;
    nx.draw_circular(plot_G, with_labels=True, font_weight='bold')&lt;br /&gt;
    pos = nx.circular_layout(plot_G)&lt;br /&gt;
    ax = plt.gca()&lt;br /&gt;
#     yield ax&lt;br /&gt;
&lt;br /&gt;
    # Add m initial nodes (m0 in barabasi-speak)&lt;br /&gt;
    G = nx.empty_graph(m)&lt;br /&gt;
    # Target nodes for new edges&lt;br /&gt;
    targets = list(range(m))&lt;br /&gt;
    # List of existing nodes, with nodes repeated once for each adjacent edge&lt;br /&gt;
    repeated_nodes = []&lt;br /&gt;
    # Start adding the other n-m nodes. The first node is m.&lt;br /&gt;
    source = m&lt;br /&gt;
    while source &amp;lt; n:&lt;br /&gt;
        G.add_edges_from(zip([source] * m, targets))&lt;br /&gt;
&lt;br /&gt;
        plot_G = nx.empty_graph(m)&lt;br /&gt;
        plot_G.add_edges_from(zip([source] * m, targets))&lt;br /&gt;
&lt;br /&gt;
        nx.draw_networkx_edges(plot_G, pos, ax=ax)&lt;br /&gt;
        yield ax&lt;br /&gt;
        &lt;br /&gt;
        # Add edges to m nodes from the source.&lt;br /&gt;
&lt;br /&gt;
        # Add one node to the list for each new edge just created.&lt;br /&gt;
        repeated_nodes.extend(targets)&lt;br /&gt;
        # And the new node &amp;quot;source&amp;quot; has m edges to add to the list.&lt;br /&gt;
        repeated_nodes.extend([source] * m)&lt;br /&gt;
        # Now choose m unique nodes from the existing nodes&lt;br /&gt;
        # Pick uniformly from repeated_nodes (preferential attachement)&lt;br /&gt;
        targets = nx.random_graphs._random_subset(repeated_nodes, m)&lt;br /&gt;
        source += 1&lt;br /&gt;
    return G&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[https://github.com/swarma/DemoForComplexity/blob/master/ab_model.ipynb 仓库地址]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:复杂系统]]&lt;/div&gt;</summary>
		<author><name>http://c2.com/cgi/wiki?$1&gt;Moonscar</name></author>
	</entry>
</feed>