def test_egonet_splitter(self): g = get_string_graph() coms = algorithms.egonet_splitter(g) self.assertEqual(type(coms.communities), list) if len(coms.communities) > 0: self.assertEqual(type(coms.communities[0]), list) self.assertEqual(type(coms.communities[0][0]), str)
elif (options.method == 'walktrap'): communities = algorithms.walktrap(g, **clust_kwargs) #elif(options.method == 'sbm_dl'): # communities = algorithms.sbm_dl(g) #elif(options.method == 'sbm_dl_nested'): # communities = algorithms.sbm_dl_nested(g) elif (options.method == 'lais2'): communities = algorithms.lais2(g, **clust_kwargs) elif (options.method == 'big_clam'): communities = algorithms.big_clam(g, **clust_kwargs) elif (options.method == 'danmf'): communities = algorithms.danmf(g, **clust_kwargs) elif (options.method == 'ego_networks'): communities = algorithms.ego_networks(g, **clust_kwargs) elif (options.method == 'egonet_splitter'): communities = algorithms.egonet_splitter(g, **clust_kwargs) elif (options.method == 'nmnf'): communities = algorithms.nmnf(g, **clust_kwargs) elif (options.method == 'nnsed'): communities = algorithms.nnsed(g, **clust_kwargs) elif (options.method == 'slpa'): communities = algorithms.slpa(g, **clust_kwargs) elif (options.method == 'bimlpa'): communities = actlgorithms.bimlpa(g, **clust_kwargs) elif (options.method == 'wcommunity'): communities = algorithms.wCommunity(g, **clust_kwargs) elif (options.method == 'aslpaw'): import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore") communities = algorithms.aslpaw(g)