import type { S2CellId } from '../../index.js'; import type { VectorKey, VectorStore } from './index.js'; /** * # Vector MMap Store * * ## Description * A mmap vector store * * ## Usage * ```ts * import { MMapVector } from 'gis-tools-ts/mmap'; * import type { VectorKey } from 'gis-tools-ts'; * * interface Data extends VectorKey { name: string }; * * const vec = new MMapVector(); * // push an entry * vec.push({ cell: 1n, name: 'test' }); * vec.push({ cell: 1n, name: 'test2' }); * // check if a key exists * vec.has(1n); // true * // get length of the store * console.log(vec.length); // 2 * * // iterate over the store * for await (const entry of vec) console.log(entry); * * // close the store * vec.close(); * ``` */ export declare class MMapVector implements VectorStore { #private; /** @param fileName - the path + file name without the extension */ constructor(fileName?: string); /** @returns the length of the store */ get length(): number; /** * Push a value into the store * @param value - the value to store */ push(value: V): void; /** * @param index - the position in the store to get the value from * @returns the value */ get(index: number | S2CellId): Promise; /** * Check if the key exists * @param key - the key * @returns true if the key exists */ has(key: number | S2CellId): Promise; /** Sort the store */ sort(): Promise; /** * iterate through the values * @yields {V} - the values iterator */ values(): AsyncGenerator; /** * iterate through the values * @returns an iterator */ [Symbol.asyncIterator](): AsyncGenerator; /** Closes the store */ close(): void; } //# sourceMappingURL=mmap.d.ts.map