/**
 * Uniform grid over label anchors, used to prune the O(n^2) cost evaluation to a
 * bounded neighborhood. The cell size is chosen so any two labels whose boxes
 * could possibly interact share or border a cell, so scanning the 3x3 block
 * around a node finds every candidate.
 */
import type { LabelNode } from './types';
export declare class SpatialHash {
    private cell;
    private readonly buckets;
    private static key;
    build(nodes: LabelNode[], cell: number): void;
    /** Nearest `max` nodes (by anchor distance) in the 3x3 cell block around `node`, excluding itself. */
    queryNeighbors(node: LabelNode, max: number): LabelNode[];
}
