networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
rooted_product(G, H, root)

A new graph is constructed representing the rooted product of the inputted graphs, G and H, with a root in H. A rooted product duplicates H for each nodes in G with the root of H corresponding to the node in G. Nodes are renamed as the direct product of G and H. The result is a subgraph of the cartesian product.

Notes

The nodes of R are the Cartesian Product of the nodes of G and H. The nodes of G and H are not relabeled.

Parameters

G,H : graph

A NetworkX graph

root : node

A node in H

Returns

R : The rooted product of G and H with a specified root in H

Return the rooted product of graphs G and H rooted at root in H.

Examples

See :

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/algorithms/operators/product.py#426
type: <class 'function'>
Commit: