parallel_modularity

Function parallel_modularity 

Source
pub fn parallel_modularity<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
    communities: &HashMap<N, usize>,
) -> f64
where N: Node + Clone + Hash + Eq + Send + Sync + Debug, E: EdgeWeight + Into<f64> + Copy + Send + Sync, Ix: IndexType + Send + Sync,
Expand description

Parallel implementation of modularity computation

Computes graph modularity using parallel processing for better performance on large graphs.

§Arguments

  • graph - The graph to analyze
  • communities - Node-to-community mapping

§Returns

  • The modularity score