import { Graph } from '../graph/graph'; import { Partition, PartitioningError } from '../types/clustering-types'; import { Edge, Node } from '../types/graph'; import { Result } from '../types/result'; import { WeightFunction } from '../types/weight-function'; /** * Perform spectral graph partitioning. * * Divides graph into k balanced partitions by analyzing the spectral properties * of the graph Laplacian matrix. * @template N - Node type * @template E - Edge type * @param graph - Input graph (directed or undirected) * @param k - Number of partitions to create * @param options - Optional configuration * @param options.weightFn - Weight function for edges (default: all edges weight 1.0) * @param options.balanceTolerance - Maximum allowed imbalance (default: 1.2) * @param options.maxKMeansIterations - Max iterations for k-means (default: 100) * @param options.seed - Random seed for k-means initialization (default: undefined) * @returns Result containing array of k partitions or error * @example * ```typescript * const graph = new Graph(true); * // ... add nodes and edges ... * * const result = spectralPartition(graph, 4); * if (result.ok) { * console.log(`Created ${result.value.length} partitions`); * } * ``` */ export declare const spectralPartition: (graph: Graph, k: number, options?: { weightFn?: WeightFunction; balanceTolerance?: number; maxKMeansIterations?: number; seed?: number; }) => Result[], PartitioningError>; //# sourceMappingURL=spectral.d.ts.map