def test_lais2(self): g = get_string_graph() com = algorithms.lais2(g) self.assertEqual(type(com.communities), list) if len(com.communities) > 0: self.assertEqual(type(com.communities[0]), list) self.assertEqual(type(com.communities[0][0]), str)
elif (options.method == 'rb_pots'): communities = algorithms.rb_pots(g, weights='weight', **clust_kwargs) 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'):