pub fn label_propagation(
store: &LpgStore,
max_iterations: usize,
) -> FxHashMap<NodeId, u64>Expand description
Detects communities using the Label Propagation Algorithm.
Each node is initially assigned a unique label. Then, iteratively, each node adopts the most frequent label among its neighbors until the labels stabilize.
§Arguments
store- The graph storemax_iterations- Maximum number of iterations (0 for unlimited)
§Returns
A map from node ID to community (label) ID.
§Complexity
O(iterations × E)