Traag, Waltman and van Eck (2019), Algorithm A.2: fast local moving (queue-based, random visiting order), refinement inside each community (well-connected singletons join well-connected sub-communities with probability proportional to exp(dH / theta)) and aggregation of the refined partition, repeated until every community is one aggregate node. Quality is modularity (node weight = strength, r = gamma / 2m) or the constant Potts model of the paper's eq. (2) (node weight 1, r = gamma); moving v into D gains k_vD - r w_v W_D.
Usage
Leidenclus(
graph,
resolution = 1,
quality = "modularity",
max_iter = 20,
theta = 0.01,
seed = 0
)Details
Randomness: the visiting orders and refinement draws come from the morie Philox stream (a new stream per phase, same order as the Python arm), so runs agree exactly across arms.
