Skip to content

@graphty/algorithms / index / louvain

Function: louvain() ​

louvain(graph, options): CommunityResult

Defined in: algorithms/community/louvain.ts:20

Louvain community detection algorithm

Implements the Louvain method for community detection in graphs. Uses modularity optimization to find community structure.

References:

  • Blondel, V. D., Guillaume, J. L., Lambiotte, R., & Lefebvre, E. (2008). Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment, 2008(10), P10008.

Parameters ​

graph ​

Graph

The input graph

options ​

LouvainOptions = {}

Algorithm options

Returns ​

CommunityResult

Community detection result with communities, modularity, and iterations