/** * Upper bound for caller-controlled search effort. It is below the maximum * node-slot count and keeps the eagerly allocated HNSW heaps within a bounded * range; larger workloads should use a staged query strategy. */ export declare const MAX_SEARCH_PARAMETER = 1000000; /** Prevent constructor options from forcing multi-gigabyte initial heaps. */ export declare const MAX_CONNECTIVITY_PARAMETER = 1000000; /** Match the maximum node-slot and layer counts accepted by HNSW deserialization. */ export declare const MAX_NODE_COUNT = 5000000; export declare const MAX_LAYER_SLOTS = 32; /** Hard cap for worker graph-index entries before any typed-array allocation. */ export declare const MAX_GRAPH_INDEX_ENTRIES = 20000000; /** Keep per-vector buffers bounded before any typed-array allocation. */ export declare const MAX_DIMENSION = 1000000; export declare function isValidPositiveSearchInteger(value: number): boolean; export declare function isValidCandidateMultiplier(value: number, k?: number): boolean; /** * Resolve the effective search effort without allowing an omitted default to * exceed the same bound enforced for explicit caller input. `required` is the * minimum effort needed to return the requested result/candidate count. */ export declare function effectiveSearchParameter(required: number, efSearch?: number): number; /** * Validate a caller-owned numeric vector before typed-array conversion. * Float32 conversion is not lossless for every finite JavaScript number: * values can overflow to Infinity or underflow to zero. Keeping this check * in one helper makes add, query, brute-force, and batch paths agree. */ export declare function validateFloat32Input(values: ArrayLike, context?: string, errorCode?: 'VALIDATION_ERROR' | 'CORRUPT_INDEX'): void; export declare function toValidatedFloat32(values: ArrayLike, context?: string): Float32Array; export declare function validatePositiveSearchInteger(value: number, name: string): void; export declare function validateCandidateMultiplier(value: number): void; //# sourceMappingURL=validation.d.ts.map