NetworkX

Previous topic

networkx.union

Next topic

networkx.intersection

networkx.disjoint_union

disjoint_union(G, H)

Return the disjoint union of graphs G and H, forcing distinct integer node labels.

Parameters:

G,H : graph

A NetworkX graph

Notes

A new graph is created, of the same class as G. It is recommended that G and H be either both directed or both undirected.