Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

random_shell_graph

random_shell_graph(constructor, seed=None)[source]

Return a random shell graph for the constructor given.

Parameters:

constructor: a list of three-tuples

(n,m,d) for each shell starting at the center shell.

n : int

The number of nodes in the shell

m : int

The number or edges in the shell

d : float

The ratio of inter-shell (next) edges to intra-shell edges. d=0 means no intra shell edges, d=1 for the last shell

seed : int, optional

Seed for random number generator (default=None).

Examples

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