random_shell_graph

random_shell_graph(constructor, seed=None)[source]

Returns a random shell graph for the constructor given.

Parameters
constructorlist of three-tuples

Represents the parameters for a shell, starting at the center shell. Each element of the list must be of the form (n, m, d), where n is the number of nodes in the shell, m is the number of edges in the shell, and d is the ratio of inter-shell (next) edges to intra-shell edges. If d is zero, there will be no intra-shell edges, and if d is one there will be all possible intra-shell edges.

seedinteger, random_state, or None (default)

Indicator of random number generation state. See Randomness.

Examples

>>> constructor = [(10, 20, 0.8), (20, 40, 0.8)]
>>> G = nx.random_shell_graph(constructor)