NetworkX

Previous topic

networkx.generators.directed.gnc_graph

Next topic

networkx.generators.geometric.random_geometric_graph

networkx.generators.directed.scale_free_graph

networkx.generators.directed.scale_free_graph(n, alpha=0.40999999999999998, beta=0.54000000000000004, gamma=0.050000000000000003, delta_in=0.20000000000000001, delta_out=0, create_using=None, seed=None)

Return a scale free directed graph.

Parameters :

n : integer

Number of nodes in graph

alpha : float

Probability for adding a new node connected to an existing node chosen randomly according to the in-degree distribution.

beta : float

Probability for adding an edge between two existing nodes. One existing node is chosen randomly according the in-degree distribution and the other chosen randomly according to the out-degree distribution.

gamma : float

Probability for adding a new node conecgted to an existing node chosen randomly according to the out-degree distribution.

delta_in : float

Bias for choosing ndoes from in-degree distribution.

delta_out : float

Bias for choosing ndoes from out-degree distribution.

create_using : graph, optional (default MultiDiGraph)

Use this graph instance to start the process (default=3-cycle).

seed : integer, optional

Seed for random number generator

Notes

The sum of alpha, beta, and gamma must be 1.

References

[R110]B. Bollob{‘a}s, C. Borgs, J. Chayes, and O. Riordan, Directed scale-free graphs, Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms, 132–139, 2003.

Examples

>>> G=nx.scale_free_graph(100)