/** * A uniform grid of point indices, keyed by cell. */ export declare class PointBucketIndex { #private; readonly cellSize: number; constructor(cellSize: number); /** * Files the point `index` under the cell holding `(x, y)`. */ add(index: number, x: number, y: number): void; /** * Every point index filed in a cell that the box touches. * * The answer holds every point of each touched cell, including points up to one cell outside the box. * A caller measures each one. */ within(minX: number, minY: number, maxX: number, maxY: number): Generator; } /** * The line a point was joined to, and how far away it lies. */ export interface NearestLinkMatch { link: T; /** * The point-to-segment distance in projection units. */ distance: number; } /** * Joins each point to the nearest line offered to it within `radius`. * * A line offered at exactly the same distance as the current nearest doesn't replace it, * so the first-offered line wins a tie and the answer follows the order the lines are read in. */ export declare class NearestLinkJoin { #private; readonly radius: number; /** * @param points The points to join, as parallel coordinate arrays. * A point's position in the arrays is its index in every answer. * @param radius The largest distance at which a line joins, in projection units. */ constructor(points: { xs: Float64Array; ys: Float64Array; }, radius: number); /** * Offers one line, as a flat `[x0, y0, x1, y1, …]` vertex array, to every point within reach of it. */ offer(link: T, vertices: ArrayLike): void; /** * The nearest line offered to point `index`, or null when none came within the radius. */ match(index: number): NearestLinkMatch | null; } //# sourceMappingURL=nearest-link.d.ts.map