import { Graph } from '../graph/graph'; import { HierarchicalResult } from '../types/clustering-types'; import { Edge, Node } from '../types/graph'; /** * Linkage method for computing cluster-to-cluster distances. */ type LinkageMethod = "single" | "complete" | "average"; /** * Perform hierarchical clustering on a graph. * @template N - Node type * @template E - Edge type * @param graph - Input graph (directed or undirected) * @param options - Configuration options * @param options.linkage - Linkage method: 'single', 'complete', or 'average' (default: 'average') * @returns Result containing dendrogram or error * @example * ```typescript * const graph = new Graph(false); * // ... add nodes and edges ... * * const result = hierarchicalClustering(graph, { linkage: 'average' }); * if (result.ok) { * const { dendrogram } = result.value; * const clusters = dendrogram.getClusters(5); * console.log(`Extracted ${clusters.length} clusters`); * } * ``` */ export declare const hierarchicalClustering: (graph: Graph, options?: { linkage?: LinkageMethod; }) => HierarchicalResult; export {}; //# sourceMappingURL=clustering.d.ts.map