Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kdm9/countmin.jl
Count-min Sketch implementation for Julia
https://github.com/kdm9/countmin.jl
Last synced: 11 days ago
JSON representation
Count-min Sketch implementation for Julia
- Host: GitHub
- URL: https://github.com/kdm9/countmin.jl
- Owner: kdm9
- License: other
- Created: 2014-10-07T04:26:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-04T13:06:00.000Z (about 8 years ago)
- Last Synced: 2024-10-11T19:23:32.818Z (about 1 month ago)
- Language: Julia
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
CountMin.jl
===========[![Build Status](https://travis-ci.org/kdmurray91/CountMin.jl.svg?branch=master)](https://travis-ci.org/kdmurray91/CountMin.jl)
A count-min-sketch implementation for Julia. See
[Wikipedia](https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch) or the
[original paper](http://dimacs.rutgers.edu/~graham/pubs/papers/cm-full.pdf) for
more information on the background of this data structure.API
---Real documentation is on its way. In the mean time, read the tests as they have
a fairly full description of the API.The API tries to follow the Julia standard method names.
# make a CMS with 4 tables of ~1000 cells
# Each cell will be a UInt8, so can count to 255. You can use any unsigned
# integral type as the cell type.
cms = CountMinSketch{UInt8}(4, 1000)# add the string "Hello"
push!(cms, "Hello")
assert(cms["Hello"] == 1)# Add 3 counts of the string "World"
add!(cms, "World", 3)
assert(cms["World"] == 3)# Remove the count of "Hello"
pop!(cms, "Hello")
assert(cms["Hello"] == 0)# Remove two counts of "World"
add!(cms, "World", -2)
assert(cms["World"] == 1)