-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
64 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/** | ||
* A filter that can count occurences of items and estimate their frequencies. | ||
* A filter that can count occurrences of items and estimate their frequencies. | ||
* @author Thomas Minier | ||
* @author Arnaud Grall | ||
*/ | ||
export default interface CountingFilter<T> { | ||
/** | ||
* Update the count min sketch with a new occurrence of an element | ||
* @param element - The new element | ||
* @param count - Number of occurences of the elemnt (defauls to one) | ||
* @param count - Number of occurrences of the elemnt (defauls to one) | ||
*/ | ||
update(element: T, count: number): void | ||
|
||
/** | ||
* Perform a point query: estimate the number of occurence of an element | ||
* Perform a point query: estimate the number of occurrence of an element | ||
* @param element - The element we want to count | ||
* @return The estimate number of occurence of the element | ||
* @return The estimate number of occurrence of the element | ||
*/ | ||
count(element: T): number | ||
} |
This file contains 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
This file contains 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