parallel_louvain_communities

Function parallel_louvain_communities 

Source
pub fn parallel_louvain_communities<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
    _max_iterations: usize,
) -> CommunityStructure<N>
where N: Node + Send + Sync + Debug, E: EdgeWeight + Into<f64> + Send + Sync + Copy, Ix: IndexType + Send + Sync,
👎Deprecated since 0.1.0-beta.2: Use parallel_louvain_communities_result instead for standardized community detection API
Expand description

Parallel version of Louvain community detection algorithm

This implementation uses parallel processing to accelerate community detection on large graphs. It leverages scirs2-core parallel operations.

§Arguments

  • graph - The undirected graph to analyze
  • max_iterations - Maximum number of optimization iterations

§Returns

  • A CommunityStructure with node assignments and modularity score

§Time Complexity

O((m * log n) / p) where m is the number of edges, n is the number of nodes, and p is the number of parallel threads. Theoretical speedup is limited by synchronization overhead and load balancing across communities.

§Space Complexity

O(n + t) where t is the number of threads, for storing community assignments and thread-local data structures for parallel processing.