networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersBackRef
lollipop_graph(m, n, create_using=None)

This is the Barbell Graph without the right barbell.

Notes

The 2 subgraphs are joined via an edge (m-1, m). If n=0, this is merely a complete graph.

(This graph is an extremal example in David Aldous and Jim Fill's etext on Random Walks on Graphs.)

Parameters

m, n : int or iterable container of nodes (default = 0)

If an integer, nodes are from :None:None:`range(m)` and :None:None:`range(m,m+n)`. If a container, the entries are the coordinate of the node.

The nodes for m appear in the complete graph $K_m$ and the nodes for n appear in the path $P_n$

create_using : NetworkX graph constructor, optional (default=nx.Graph)

Graph type to create. If graph instance, then cleared before populated.

Returns the Lollipop Graph; :None:None:`K_m` connected to :None:None:`P_n`.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.drawing.layout.random_layout networkx.readwrite.adjlist.generate_adjlist networkx.readwrite.edgelist.generate_edgelist networkx.readwrite.multiline_adjlist.generate_multiline_adjlist networkx.algorithms.components.biconnected.biconnected_components

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/generators/classic.py#516
type: <class 'function'>
Commit: