NetworkX

Previous topic

union

Next topic

intersection

disjoint_union

disjoint_union(G, H)[source]

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.