UNPKG

@graphty/algorithms

Version:

Graph algorithms library for browser environments implemented in TypeScript

19 lines 818 B
import { Graph } from "../../core/graph.js"; import type { CommunityResult, LouvainOptions } from "../../types/index.js"; /** * 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. * * @param graph - The input graph * @param options - Algorithm options * @returns Community detection result with communities, modularity, and iterations */ export declare function louvain(graph: Graph, options?: LouvainOptions): CommunityResult; //# sourceMappingURL=louvain.d.ts.map