/**
 * Graph adapter that converts a CodeGraph into the dense array format
 * expected by the Leiden optimiser.
 *
 * Vendored from ngraph.leiden (MIT) — adapted for CodeGraph.
 */
import type { CodeGraph, EdgeAttrs, NodeAttrs } from '../../model.js';
export interface EdgeEntry {
    to: number;
    w: number;
}
export interface InEdgeEntry {
    from: number;
    w: number;
}
export interface GraphAdapterOptions {
    directed?: boolean;
    linkWeight?: (attrs: EdgeAttrs) => number;
    nodeSize?: (attrs: NodeAttrs) => number;
    baseNodeIds?: string[];
}
export interface GraphAdapter {
    n: number;
    nodeIds: string[];
    idToIndex: Map<string, number>;
    size: Float64Array;
    selfLoop: Float64Array;
    strengthOut: Float64Array;
    strengthIn: Float64Array;
    outEdges: EdgeEntry[][];
    inEdges: InEdgeEntry[][];
    directed: boolean;
    totalWeight: number;
    forEachNeighbor: (i: number, cb: (to: number, w: number) => void) => void;
}
export declare function makeGraphAdapter(graph: CodeGraph, opts?: GraphAdapterOptions): GraphAdapter;
//# sourceMappingURL=adapter.d.ts.map