Esempio n. 1
0
 def test_fluid(self):
     g = get_string_graph()
     coms = algorithms.async_fluid(g, 3)
     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)
Esempio n. 2
0
 def async(n_coms) : return lambda G : algorithms.async_fluid(G, n_coms)
 algos['async_fluid'] = [async(len(c)) for c in lfr_comms]