Skip to main content
`Ctrl`+`K`

# random_shell_graph

random_shell_graph(constructor, seed=None, *, create_using=None)

  Returns a random shell graph for the constructor given.

  Parameters:
    constructor list 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.

    seed integer, random_state, or None (default)

      Indicator of random number generation state. See Randomness.

    create_using Graph constructor, optional (default=nx.Graph)

      Graph type to create. Graph instances are not supported. Multigraph and directed types are not supported and raise a `NetworkXError`.

  Examples

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