Documentation
¶
Index ¶
Constants ¶
const ( DefaultSeed1 uint64 = 6269 DefaultSeed2 uint64 = 4241 )
Variables ¶
This section is empty.
Functions ¶
func GetFalsePositiveProbabilityEstimate ¶
`GetPositiveProbablityEstimate`: returns probability of getting true, for a filter with n_bits, n_hash, and n_add Add operations.
Types ¶
type Bloom ¶
type Bloom struct {
State BloomDS
}
func NewBloomCustom ¶
`NewBloomCustom` return a custom `Bloom` object
func NewBloomDefault ¶
`NewBloomDefault` return a default `Bloom` object
func NewBloomFromBloomDS ¶
`NewBloomFromBloomDS`: return a `Bloom` using the data from bloom_ds
func (*Bloom) Check ¶
`Check`: check a value to the set (false negative: never, false positives: maybe)
type BloomAtomic ¶
type BloomAtomic struct {
State BloomDS
// contains filtered or unexported fields
}
func NewBloomAtomicCustom ¶
func NewBloomAtomicCustom(id string, n_bits, n_hash uint64, seeds [2]uint64) *BloomAtomic
`NewBloomAtomicCustom` return a custom `BloomAtomic` object
func NewBloomAtomicDefault ¶
func NewBloomAtomicDefault(id string, n_bits, n_hash uint64) *BloomAtomic
`NewBloomAtomicDefault` return a default `BloomAtomic` object
func NewBloomAtomicFromBloomDS ¶
func NewBloomAtomicFromBloomDS(b *BloomDS) *BloomAtomic
`NewBloomAtomicFromBloomDS`: return a `BloomAtomic` using the data from the bloom_ds
func (*BloomAtomic) Check ¶
func (b *BloomAtomic) Check(value any) bool
`Check: check a value to the set (false negative: never, false positives: maybe)
func (*BloomAtomic) GetState ¶ added in v0.1.1
func (b *BloomAtomic) GetState() BloomDS
`GetState`: return current State bool
func (*BloomAtomic) Union ¶
func (b1 *BloomAtomic) Union(b2 *BloomDS) bool
`Union`: tries state union
type BloomDS ¶
func NewBloomDSCustom ¶
`NewBloomDSCustom`: return custom bloom_ds
func NewBloomDSDefault ¶
`NewBloomDSDefault`: return default bloom_ds
func (*BloomDS) GetIndices ¶
`GetIndices`: get indices that would be considered for a value
type BloomRW ¶
func NewBloomRWCustom ¶
`NewBloomRWCustom` return a custom `BloomRW` object
func NewBloomRWDefault ¶
`NewBloomRWDefault` return a default `BloomRW` object
func NewBloomRWFromBloomDS ¶
`NewBloomRWFromBloomDS`: return a `BloomRW` using the data from the bloom_ds
func (*BloomRW) Check ¶
`Check`: check a value to the set (false negative: never, false positives: maybe)
type BloomShard ¶
type BloomShard struct {
State BloomDS
NShards uint64
Shards []sync.RWMutex
// contains filtered or unexported fields
}
func NewBloomShardCustom ¶
func NewBloomShardCustom(id string, n_bits, n_hash, n_shards uint64, seeds [2]uint64) *BloomShard
`NewBloomShardCustom` return a custom `BloomShard` object
func NewBloomShardDefault ¶
func NewBloomShardDefault(id string, n_bits, n_hash, n_shards uint64) *BloomShard
`NewBloomShardDefault` return a default `BloomShard` object
func NewBloomShardFromBloomDS ¶
func NewBloomShardFromBloomDS(b *BloomDS, n_shard uint64) *BloomShard
`NewBloomShardFromBloomDS`: return a `BloomShard` using the data from the bloom_ds
func (*BloomShard) Check ¶
func (b *BloomShard) Check(value any) bool
`Check`: check a value to the set (false negative: never, false positives: maybe)
func (*BloomShard) GetState ¶ added in v0.1.1
func (b *BloomShard) GetState() BloomDS
`GetState`: return current State bool