Function greedy_modularity_optimization

Source
pub fn greedy_modularity_optimization<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
    max_iterations: usize,
) -> CommunityStructure<N>
where N: Node + Clone + Hash + Eq, E: EdgeWeight + Into<f64> + Copy, Ix: IndexType,
Expand description

Greedy modularity optimization algorithm

This is a simplified version of modularity optimization that uses a greedy approach without simulated annealing. It’s faster but may get stuck in local optima.

§Arguments

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

§Returns

  • A community structure with optimized modularity