import type { Properties, VectorPoint } from '../..';
/** Represents a vector store or an array */
export interface KDStore<T extends Properties = Properties> {
    push: (value: VectorPoint<T>) => void;
    get: (index: number) => VectorPoint<T>;
    getRange: (indexStart: number, indexEnd: number) => VectorPoint<T>[];
    length: number;
    values: () => Generator<VectorPoint<T>>;
    sort: () => void;
    [Symbol.iterator]: () => Generator<VectorPoint<T>>;
    close: () => void;
}
/** A constructor for a vector store */
export type KDStoreConstructor<T extends Properties = Properties> = new (nodeSize: number) => KDStore<T>;
/** A local KD key-value store */
export declare class KDSpatialIndex<T extends Properties = Properties> implements KDStore<T> {
    #private;
    private readonly nodeSize;
    /**
     * @param nodeSize - the size of each kd-tree node
     */
    constructor(nodeSize?: number);
    /** @returns the length of the store */
    get length(): number;
    /**
     * Push a value into the store
     * @param value - the value to store
     */
    push(value: VectorPoint<T>): void;
    /**
     * Get a value at index
     * @param index - the position in the store to get the value from
     * @returns the value
     */
    get(index: number): VectorPoint<T>;
    /**
     * Get a range of values within an index range
     * @param indexStart - the start index
     * @param indexEnd - the end index
     * @returns the values
     */
    getRange(indexStart: number, indexEnd: number): VectorPoint<T>[];
    /**
     * iterate through the values
     * @yields an iterator
     */
    values(): Generator<VectorPoint<T>>;
    /** Sort the store in place */
    sort(): void;
    /**
     * iterate through the values
     * @returns an iterator
     */
    [Symbol.iterator](): Generator<VectorPoint<T>>;
    /** Closes the store */
    close(): void;
}
//# sourceMappingURL=index.d.ts.map