NetworkX

Previous topic

networkx.algorithms.operators.symmetric_difference

Next topic

networkx.algorithms.operators.compose

networkx.algorithms.operators.cartesian_product

networkx.algorithms.operators.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.