Skip to content

Function: louvain() ​

ts
function louvain(graph, options?): Int32Array;

Communities by the Louvain method (Blondel et al. 2008): the community of each node, numbered from 0 in the order of each community's first node. Links are read as undirected and weighted by link.value. Deterministic: there is no random node order, so the result is one of the partitions Louvain can find, always the same one.

Parameters ​

ParameterType
graphGraphLike
optionsCommunityOptions

Returns ​

Int32Array

Released under the MIT License.