trassel
Version:
Graph computing in JavaScript
18 lines (17 loc) • 976 B
TypeScript
/**
* Community detection using the Louvain algorithm.
* This function takes a list of nodes and edges (data must be valid!) and computes community assignments
* The function returns an array of arrays where each inner array represents a community populated by node IDs.
* To read more about the Louvain community detection algorithm:
* https://arxiv.org/pdf/0803.0476.pdf
* https://medium.com/walmartglobaltech/demystifying-louvains-algorithm-and-its-implementation-in-gpu-9a07cdd3b010
* @param {import("../model/igraphnode").IGraphNode[]} nodes
* @param {import("../model/igraphedge").IGraphEdge[]} edges
* @returns {{communities: import("../model/nodeid").NodeID[][], communityTable: {[key: string]: any}}}
*/
export default function _default(nodes: import("../model/igraphnode").IGraphNode[], edges: import("../model/igraphedge").IGraphEdge[]): {
communities: import("../model/nodeid").NodeID[][];
communityTable: {
[key: string]: any;
};
};