networkx.generators.small.diamond_graph

diamond_graph(create_using=None)[source]

Returns the Diamond graph

The Diamond Graph is planar undirected graph with 4 nodes and 5 edges. It is also sometimes known as the double triangle graph or kite graph [1].

Parameters
create_usingNetworkX graph constructor, optional (default=nx.Graph)

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

Returns
Gnetworkx Graph

Diamond Graph with 4 nodes and 5 edges

References

1

https://mathworld.wolfram.com/DiamondGraph.html