NetworkX

Previous topic

networkx.symmetric_difference

Next topic

networkx.compose

networkx.cartesian_product

cartesian_product(G, H, create_using=None)

Return the Cartesian product of G and H.

Parameters:

G,H : graph

A NetworkX graph

create_using : NetworkX graph

Use specified graph for result. Otherwise a new graph is created with the same type as G.

Notes

Only tested with Graph class. Graph, node, and edge attributes are not copied to the new graph.