Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/networkx/algorithms/community/__init__.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-10-20 07:00 +0000

1"""Functions for computing and measuring community structure. 

2 

3The ``community`` subpackage can be accessed by using :mod:`networkx.community`, then accessing the 

4functions as attributes of ``community``. For example:: 

5 

6 >>> import networkx as nx 

7 >>> G = nx.barbell_graph(5, 1) 

8 >>> communities_generator = nx.community.girvan_newman(G) 

9 >>> top_level_communities = next(communities_generator) 

10 >>> next_level_communities = next(communities_generator) 

11 >>> sorted(map(sorted, next_level_communities)) 

12 [[0, 1, 2, 3, 4], [5], [6, 7, 8, 9, 10]] 

13 

14""" 

15from networkx.algorithms.community.asyn_fluid import * 

16from networkx.algorithms.community.centrality import * 

17from networkx.algorithms.community.kclique import * 

18from networkx.algorithms.community.kernighan_lin import * 

19from networkx.algorithms.community.label_propagation import * 

20from networkx.algorithms.community.lukes import * 

21from networkx.algorithms.community.modularity_max import * 

22from networkx.algorithms.community.quality import * 

23from networkx.algorithms.community.community_utils import * 

24from networkx.algorithms.community.louvain import *