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)
def async(n_coms) : return lambda G : algorithms.async_fluid(G, n_coms) algos['async_fluid'] = [async(len(c)) for c in lfr_comms]