/**
 * GraphAnalysis — graph analysis algorithms.
 *
 * Contains: levels, rootAncestors, transitiveReduction, transitiveClosure,
 * transitiveClosureStream. Receives BfsFn and TopoSortFn callbacks from
 * the facade to avoid circular imports.
 *
 * @module domain/services/query/GraphAnalysis
 */
import type { Direction, NeighborOptions } from '../../../ports/NeighborProviderPort.ts';
import { type BfsFn, type TopoSortFn, type RunStats, type TraversalStats, type default as TraversalContext } from './TraversalContext.ts';
export default class GraphAnalysis {
    private readonly _ctx;
    private readonly _bfs;
    private readonly _topologicalSort;
    constructor(ctx: TraversalContext, bfs: BfsFn, topologicalSort: TopoSortFn);
    levels(params: {
        start: string | string[];
        direction?: Direction;
        options?: NeighborOptions;
        maxNodes?: number;
        signal?: AbortSignal;
    }): Promise<{
        levels: Map<string, number>;
        maxLevel: number;
        stats: TraversalStats;
    }>;
    rootAncestors(params: {
        start: string;
        options?: NeighborOptions;
        maxNodes?: number;
        maxDepth?: number;
        signal?: AbortSignal;
    }): Promise<{
        roots: string[];
        stats: TraversalStats;
    }>;
    transitiveReduction(params: {
        start: string | string[];
        direction?: Direction;
        options?: NeighborOptions;
        maxNodes?: number;
        signal?: AbortSignal;
    }): Promise<{
        edges: Array<{
            from: string;
            to: string;
            label: string;
        }>;
        removed: number;
        stats: TraversalStats;
    }>;
    transitiveClosureStream(params: {
        start: string | string[];
        direction?: Direction;
        options?: NeighborOptions;
        maxNodes?: number;
        maxEdges?: number;
        signal?: AbortSignal;
    }): AsyncGenerator<{
        from: string;
        to: string;
    }>;
    transitiveClosure(params: {
        start: string | string[];
        direction?: Direction;
        options?: NeighborOptions;
        maxNodes?: number;
        maxEdges?: number;
        signal?: AbortSignal;
    }): Promise<{
        edges: Array<{
            from: string;
            to: string;
        }>;
        stats: TraversalStats;
    }>;
    _prepareTransitiveClosure(params: {
        start: string | string[];
        direction: Direction;
        options?: NeighborOptions;
        maxNodes: number;
        signal?: AbortSignal;
        rs: RunStats;
        opName: string;
    }): Promise<{
        nodeList: string[];
        nodesVisited: number;
    }>;
    private _streamTransitiveClosureEdges;
}
