/** * @nahisaho/yata-scale - Bloom Filter * * Space-efficient probabilistic data structure for membership testing */ import type { BloomFilterConfig, IndexStats } from '../types.js'; /** * Bloom filter for efficient membership testing */ export declare class BloomFilter { private bitArray; private readonly size; private readonly hashCount; private itemCount; constructor(config: BloomFilterConfig); /** * Calculate optimal bit array size */ private calculateSize; /** * Calculate optimal number of hash functions */ private calculateHashCount; /** * Add an item to the filter */ add(item: string): void; /** * Check if an item might be in the filter */ mightContain(item: string): boolean; /** * Hash function using MurmurHash3-like algorithm with seed */ private hash; /** * Set a bit in the array */ private setBit; /** * Get a bit from the array */ private getBit; /** * Clear the filter */ clear(): void; /** * Get current false positive rate estimate */ getFalsePositiveRate(): number; /** * Get fill ratio (percentage of bits set) */ getFillRatio(): number; /** * Merge another bloom filter into this one */ merge(other: BloomFilter): void; /** * Create a copy of this filter */ clone(): BloomFilter; /** * Serialize to buffer */ serialize(): Uint8Array; /** * Deserialize from buffer */ static deserialize(buffer: Uint8Array): BloomFilter; /** * Get item count */ get count(): number; /** * Get bit array size in bytes */ get sizeBytes(): number; /** * Get index statistics */ getStats(): IndexStats; } //# sourceMappingURL=BloomFilter.d.ts.map