Add a function that updates value of the count min sketch instead of updating it one at a time#38
Open
ghost wants to merge 1 commit into
Open
Add a function that updates value of the count min sketch instead of updating it one at a time#38ghost wants to merge 1 commit into
ghost wants to merge 1 commit into
Conversation
dimitarvdimitrov
added a commit
to dimitarvdimitrov/BoomFilters
that referenced
this pull request
Jun 28, 2025
Implements an AddN function that adds N occurrences of an item to the Count-Min Sketch, unlike the existing Set function in PR tylertreat#38 which sets the count to a specific value. The AddN function works similar to Add but takes a uint64 parameter for the count: - Increments matrix buckets by N instead of 1 - Increments total count by N instead of 1 - Returns the sketch instance for method chaining Includes comprehensive tests covering functionality, chaining, and total count verification.
dimitarvdimitrov
added a commit
to dimitarvdimitrov/BoomFilters
that referenced
this pull request
Jun 28, 2025
Implements an AddN function that adds N occurrences of an item to the Count-Min Sketch, unlike the existing Set function in PR tylertreat#38 which sets the count to a specific value. The AddN function works similar to Add but takes a uint64 parameter for the count: - Increments matrix buckets by N instead of 1 - Increments total count by N instead of 1 - Returns the sketch instance for method chaining Includes comprehensive tests covering functionality, chaining, and total count verification.
Contributor
|
wouldn't this API skew distributions of other values? Let's say we wanted to add these elements: foo: 10 Let's say that foo and bar have been added already:
Now we want to call
I'm not sure if an I opened another PR to implement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.