NetworkX

Previous topic

networkx.generators.degree_seq.directed_configuration_model

Next topic

networkx.generators.degree_seq.havel_hakimi_graph

networkx.generators.degree_seq.expected_degree_graph

expected_degree_graph(w, create_using=None, seed=None)

Return a random graph G(w) with expected degrees given by w.

Parameters:

w : list

The list of expected degrees.

create_using : graph, optional (default Graph)

Return graph of this type. The instance will be cleared.

seed : hashable object, optional

The seed for the random number generator.

References

[R53]Fan Chung and L. Lu, Connected components in random graphs with given expected degree sequences, Ann. Combinatorics, 6, pp. 125-145, 2002.

Examples

>>> z=[10 for i in range(100)]
>>> G=nx.expected_degree_graph(z)