Skip to content

Commit

Permalink
add NumBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
seiflotfy committed Mar 5, 2024
1 parent 0b045d9 commit 0ae22b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func NewFilter(ndv uint64, fpp float64) Filter {
func (f Filter) SizeInBytes() int { return len(f) * blockSizeInBytes }
func (f Filter) AddHash(hash uint64) { f[hash%uint64(len(f))].AddHash(hash) }
func (f Filter) Contains(hash uint64) bool { return f[hash%uint64(len(f))].Contains(hash) }
func (f Filter) NumBlocks() int { return len(f) }

func (f Filter) Merge(other Filter) {
for i := range f {
Expand Down

0 comments on commit 0ae22b6

Please sign in to comment.