/**
 * Core Leiden/Louvain community detection optimiser.
 * Vendored from ngraph.leiden (MIT) — adapted to use CodeGraph + local RNG.
 */
import { CodeGraph } from '../../model.js';
import type { GraphAdapter, GraphAdapterOptions } from './adapter.js';
import type { Partition } from './partition.js';
declare const CandidateStrategy: {
    readonly Neighbors: 0;
    readonly All: 1;
    readonly RandomAny: 2;
    readonly RandomNeighbor: 3;
};
type CandidateStrategyCode = (typeof CandidateStrategy)[keyof typeof CandidateStrategy];
export interface LeidenOptions {
    directed?: boolean;
    randomSeed?: number;
    maxLevels?: number;
    maxLocalPasses?: number;
    allowNewCommunity?: boolean;
    candidateStrategy?: 'neighbors' | 'all' | 'random' | 'random-neighbor';
    quality?: string;
    resolution?: number;
    refine?: boolean;
    preserveLabels?: boolean | Map<number, number>;
    maxCommunitySize?: number;
    refinementTheta?: number;
    fixedNodes?: Set<string> | string[];
    linkWeight?: GraphAdapterOptions['linkWeight'];
    nodeSize?: GraphAdapterOptions['nodeSize'];
    baseNodeIds?: string[];
}
export interface NormalizedOptions {
    directed: boolean;
    randomSeed: number;
    maxLevels: number;
    maxLocalPasses: number;
    allowNewCommunity: boolean;
    candidateStrategyCode: CandidateStrategyCode;
    quality: string;
    resolution: number;
    refine: boolean;
    preserveLabels: boolean | Map<number, number> | undefined;
    maxCommunitySize: number;
    refinementTheta: number;
    fixedNodes: Set<string> | string[] | undefined;
}
export interface LevelEntry {
    graph: GraphAdapter;
    partition: Partition;
}
export interface LouvainResult {
    graph: GraphAdapter;
    partition: Partition;
    levels: LevelEntry[];
    originalToCurrent: Int32Array;
    originalNodeIds: string[];
    baseGraph: GraphAdapter;
}
export declare function runLouvainUndirectedModularity(graph: CodeGraph, optionsInput?: LeidenOptions): LouvainResult;
export {};
//# sourceMappingURL=optimiser.d.ts.map