house_graph#

house_graph(create_using=None)[source]#

Returns the House graph (square with triangle on top)

The house graph is a simple undirected graph with 5 nodes and 6 edges [1].

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

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

Returns:
Gnetworkx Graph

House graph in the form of a square with a triangle on top

References


Additional backends implement this function

cugraph : GPU-accelerated backend.