Warning
This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
barabasi_albert_graph¶

barabasi_albert_graph
(n, m, seed=None)[source]¶ Returns a random graph according to the Barabási–Albert preferential attachment model.
A graph of
n
nodes is grown by attaching new nodes each withm
edges that are preferentially attached to existing nodes with high degree.Parameters: Returns: G
Return type: Raises: NetworkXError
– Ifm
does not satisfy1 <= m < n
.References
[1] A. L. Barabási and R. Albert “Emergence of scaling in random networks”, Science 286, pp 509512, 1999.