rooted_product(G, H, root)¶
Return the rooted product of graphs G and H rooted at root in H.
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.
G,H (graph) – A NetworkX graph
root (node) – A node in H
- Return type
The rooted product of G and H with a specified root in H
The nodes of R are the Cartesian Product of the nodes of G and H. The nodes of G and H are not relabeled.