Function hierarchical_communities

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

Hierarchical community structure using agglomerative clustering

This algorithm starts with each node as its own community and iteratively merges communities to maximize modularity. It builds a dendrogram-like structure showing the hierarchy of communities.

§Arguments

  • graph - The graph to analyze
  • linkage - Linkage criterion (“single”, “complete”, “average”)

§Returns

  • A vector of community structures at different hierarchy levels