This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
random_lobster(n, p1, p2, seed=None)¶
Returns a random lobster graph.
A lobster is a tree that reduces to a caterpillar when pruning all leaf nodes. A caterpillar is a tree that reduces to a path graph when pruning all leaf nodes; setting
p2to zero produces a caterillar.