Skip to main content

modularity

Function modularity 

Source
pub fn modularity<N, E>(graph: &Graph<N, E>, communities: &[Community]) -> f32
Expand description

Compute modularity Q for a given partitioning of the graph. Q = (1/2m) * sum_ij [ A_ij - k_i*k_j/(2m) ] * delta(c_i, c_j)