import { Graph } from '../graph/graph'; import { InfomapResult } from '../types/clustering-types'; import { Edge, Node } from '../types/graph'; import { WeightFunction } from '../types/weight-function'; /** * Detect communities using the Infomap algorithm. * * Infomap uses information theory to find communities by minimizing the * description length (map equation) of random walks on the network. * @template N - Node type * @template E - Edge type * @param graph - Input graph (directed or undirected) * @param options - Optional configuration * @param options.weightFn - Weight function for edges (default: all edges weight 1.0) * @param options.maxIterations - Maximum iterations for optimization (default: 100) * @param options.numTrials - Number of random trials for greedy search (default: 10) * @param options.seed - Random seed for reproducibility (default: undefined) * @returns Result containing modules with compression ratio * @example * ```typescript * const graph = new Graph(true); * // ... add nodes and edges ... * * const result = infomap(graph); * if (result.ok) { * console.log(`Found ${result.value.modules.length} modules`); * console.log(`Compression ratio: ${result.value.compressionRatio}`); * } * ``` */ export declare const infomap: (graph: Graph, options?: { weightFn?: WeightFunction; maxIterations?: number; numTrials?: number; seed?: number; }) => InfomapResult; //# sourceMappingURL=infomap.d.ts.map