Skip to content

@graphty/algorithms / index / girvanNewman

Function: girvanNewman() ​

girvanNewman(graph, options): CommunityResult[]

Defined in: algorithms/community/girvan-newman.ts:23

Girvan-Newman community detection algorithm

Implements the Girvan-Newman method for community detection by iteratively removing edges with the highest betweenness centrality until the graph splits into disconnected components.

This is a divisive hierarchical clustering algorithm that produces a dendrogram of community structures.

References:

  • Girvan, M., & Newman, M. E. J. (2002). Community structure in social and biological networks. Proceedings of the National Academy of Sciences, 99(12), 7821-7826.

Parameters ​

graph ​

Graph

The input graph

options ​

GirvanNewmanOptions = {}

Algorithm options

Returns ​

CommunityResult[]

Array of community detection results representing the dendrogram