/** biome-ignore-all lint/suspicious/noBitwiseOperators: <> */ import type { Copy } from '@chzky/core'; /** ## `BloomFilter` : [布隆过滤器](https://zh.wikipedia.org/wiki/%E5%B8%83%E9%9A%86%E8%BF%87%E6%BB%A4%E5%99%A8) + 可用于快速高效判断某个数据`不存在`于集合中 @example ```ts const bfilter = BloomFilter.new() bfilter.add({ msg: 'hello' }) // 真阴性 <判断为false时一定为false> assert.not(bfilter.has({ msg: 'word' })) // 假阳性 <判断为true时可能为true> assert(bfilter.has({ msg: 'hello' })) ``` */ export declare class BloomFilter implements Copy { size: number; private bit_array; /** hash数组的长度,默认为 32 * 356 */ private sizelen; /** hash生成函数的个数 , 越多碰撞检测约俩默认为 16 */ private readonly hashlen; get bits(): Uint8Array; set bits(v: Uint8Array); constructor(); private set_bit; private get_bit; /** ### `add` : 插入数据 */ add(item: T): void; /** ### `has` : 判断数据是否存在 + 返回值`true`表示`可能存在`(可能存在的概率取决于哈希函数的个数和布隆过滤器的大小) + 返回值`false`表示`一定不存在` */ has(item: T): boolean; /** ### `clone` : 实现`Copy` */ clone(): BloomFilter; /** ### `new` : 实现`NewAble` */ static new(): BloomFilter; } //# sourceMappingURL=bloomFilter.d.ts.map