Skip to main content

Module community

Module community 

Source
Expand description

Community detection: connected components and label propagation.

Both algorithms treat the directed weighted graph as undirected — an edge connects its endpoints into the same community regardless of direction. Edges are traversed via the forward CSR; since every stored edge is visited from its source, that single pass already unions both endpoints, so no reverse traversal is needed for connected components. Label propagation reads neighbors in both directions.

Constants§

LABEL_PROPAGATION_ITERS
Default maximum iteration count for label_propagation.

Functions§

connected_components
Connected components via union-find (union-by-rank + path compression).
label_propagation
Label propagation community detection (asynchronous, weighted).
label_propagation_default
Label propagation with the default iteration cap (LABEL_PROPAGATION_ITERS).