@graphty/algorithms
Version:
Graph algorithms library for browser environments implemented in TypeScript
23 lines • 983 B
TypeScript
import { Graph } from "../../core/graph.js";
import type { CommunityResult, GirvanNewmanOptions } from "../../types/index.js";
/**
* 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.
*
* @param graph - The input graph
* @param options - Algorithm options
* @returns Array of community detection results representing the dendrogram
*/
export declare function girvanNewman(graph: Graph, options?: GirvanNewmanOptions): CommunityResult[];
//# sourceMappingURL=girvan-newman.d.ts.map