NetworkX

Previous topic

networkx.generators.random_graphs.random_regular_graph

Next topic

networkx.generators.random_graphs.powerlaw_cluster_graph

networkx.generators.random_graphs.barabasi_albert_graph

barabasi_albert_graph(n, m, create_using=None, seed=None)

Return random graph using Barabási-Albert preferential attachment model.

A graph of n nodes is grown by attaching new nodes each with m edges that are preferentially attached to existing nodes with high degree.

Parameters:

n : int

Number of nodes

m : int

Number of edges to attach from a new node to existing nodes

create_using : graph, optional (default Graph)

The graph instance used to build the graph.

seed : int, optional

Seed for random number generator (default=None).

Returns:

G : Graph

Notes

The initialization is a graph with with m nodes and no edges.

References

[R60]A. L. Barabási and R. Albert “Emergence of scaling in random networks”, Science 286, pp 509-512, 1999.