is_cover#
- is_cover(G, communities)[source]#
Returns True if
communitiesis a cover of the nodes ofG.A cover of a graph is a collection of sets of nodes such that every node in the graph belongs to at least one set. Unlike a partition, sets in a cover may overlap.
- Parameters:
- GNetworkX graph.
- communitieslist or iterable of sets of nodes
If not a list, the iterable is converted internally to a list. If it is an iterator it is exhausted. Nodes appearing in
communitiesbut not inGare ignored, mirroring the behavior ofis_partition().
See also
References
[1]Lancichinetti, A., Fortunato, S., & Kertesz, J. (2009). “Detecting the overlapping and hierarchical community structure in complex networks.” New J. Phys. 11, 033015.