networkx.algorithms.community.community_utils.is_partition¶
-
is_partition(G, communities)[source]¶ Return True if and only if
communitiesis a partition of the nodes ofG.A partition of a universe set is a family of pairwise disjoint sets whose union is the entire universe set.
Gis a NetworkX graph.communitiesis an iterable of sets of nodes ofG. This iterable will be consumed multiple times during the execution of this function.