def test_rbpots(self): g = get_string_graph() coms = algorithms.rb_pots(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 == 'gdmp2'): communities = algorithms.gdmp2(g, **clust_kwargs) elif (options.method == 'greedy_modularity'): communities = algorithms.greedy_modularity(g, weight='weight', **clust_kwargs) #elif(options.method == 'infomap'): # communities = algorithms.infomap(g) elif (options.method == 'label_propagation'): communities = algorithms.label_propagation(g, **clust_kwargs) elif (options.method == 'markov_clustering'): communities = algorithms.markov_clustering(g, **clust_kwargs) elif (options.method == 'rber_pots'): communities = algorithms.rber_pots(g, weights='weight', **clust_kwargs) 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'):