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]¶ Returns a random shell graph for the constructor given.
Parameters:  constructor (list of threetuples) – Represents the parameters for a shell, starting at the center
shell. Each element of the list must be of the form
(n, m, d)
, wheren
is the number of nodes in the shell,m
is the number of edges in the shell, andd
is the ratio of intershell (next) edges to intrashell edges. Ifd
is zero, there will be no intrashell edges, and ifd
is one there will be all possible intrashell edges.  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)
 constructor (list of threetuples) – Represents the parameters for a shell, starting at the center
shell. Each element of the list must be of the form