calculate_modularity

Function calculate_modularity 

Source
pub fn calculate_modularity<N, E, Ix>(
    graph: &Graph<N, E, Ix>,
    communities: &HashMap<NodeIndex<Ix>, usize>,
    m: f64,
) -> f64
where N: Node + Debug, E: EdgeWeight + Into<f64> + Copy, Ix: IndexType,
Expand description

Calculate modularity for a given partition