NetworkX

Previous topic

networkx.configuration_model

Next topic

networkx.havel_hakimi_graph

networkx.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

[R10]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)