aryagraph.algorithms.community.asyn_fluid_communities#

aryagraph.algorithms.community.asyn_fluid_communities(g: Any, k: int, max_iter: int = 100, seed: Any = None) → list[set][source]#

Fluid communities (Parés et al. 2017): k communities compete by density.

Needs a connected undirected graph and 1 ≤ k ≤ n. Each community has total density 1 spread over its members; nodes (visited in random order) join the community with the largest summed density among themselves and their neighbours. Stops when stable or after max_iter sweeps.