https://github.com/preciz/talan
Probabilistic data structures (bloom filter / counting bloom filter / linear counter)
https://github.com/preciz/talan
bloom-filter cardinality-estimation membership
Last synced: about 2 months ago
JSON representation
Probabilistic data structures (bloom filter / counting bloom filter / linear counter)
- Host: GitHub
- URL: https://github.com/preciz/talan
- Owner: preciz
- License: mit
- Created: 2019-06-23T10:40:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-26T20:03:14.000Z (10 months ago)
- Last Synced: 2025-03-24T09:21:18.047Z (2 months ago)
- Topics: bloom-filter, cardinality-estimation, membership
- Language: Elixir
- Homepage: https://hex.pm/packages/talan
- Size: 90.8 KB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Talán
[](https://github.com/preciz/talan/actions/workflows/test.yml)
Probabilistic data structures in Elixir:
* Bloom filter for membership estimation
* Counting bloom filter for membership & cardinality estimation with delete support
* Linear probabilistic counter for cardinality estimationDocumentation can be found at [https://hexdocs.pm/talan](https://hexdocs.pm/talan).
Talán is a Hungarian adverb meaning: maybe, perhaps, probably.
## Installation
Add `talan` to your list of dependencies in `mix.exs`:
**Note**: it requires OTP-21.2.1 or later.
```elixir
def deps do
[
{:talan, "~> 0.2.0"}
]
end
```## Usage
```elixir
alias Talan.BloomFilterbloom_filter = BloomFilter.new(1000)
bloom_filter |> BloomFilter.put("Barna")
bloom_filter |> BloomFilter.member?("Barna")
true
bloom_filter |> BloomFilter.member?("Kovacs")
false
```## License
Talán is [MIT licensed](LICENSE).