def test_bigClam(self): g = nx.karate_club_graph() coms = algorithms.big_clam(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]), int)
def test_bigClam(self): g = get_string_graph() coms = algorithms.big_clam(g) self.assertEqual(type(coms.communities), list) if len(coms.communities) > 0: self.assertEqual(type(coms.communities[0]), list) if len(coms.communities[0]) > 0: self.assertEqual(type(coms.communities[0][0]), str)
elif (options.method == 'significance_communities'): communities = algorithms.significance_communities(g, **clust_kwargs) elif (options.method == 'spinglass'): communities = algorithms.spinglass(g, **clust_kwargs) elif (options.method == 'surprise_communities'): communities = algorithms.surprise_communities(g, **clust_kwargs) 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'):