{"id":18933503,"url":"https://github.com/positiveblue/libdori","last_synced_at":"2026-03-19T08:30:15.697Z","repository":{"id":70775778,"uuid":"64511301","full_name":"positiveblue/libDori","owner":"positiveblue","description":"Probabilistic Data Structures","archived":false,"fork":false,"pushed_at":"2017-04-17T17:54:20.000Z","size":18806,"stargazers_count":2,"open_issues_count":8,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-31T20:43:05.412Z","etag":null,"topics":["big-data","cpp","hpc","probabilistic-models","randomized-algorithms"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/positiveblue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-29T21:24:29.000Z","updated_at":"2019-01-20T12:52:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e22e941e-ba07-4730-bed2-772775ce8b5c","html_url":"https://github.com/positiveblue/libDori","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FlibDori","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FlibDori/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FlibDori/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiveblue%2FlibDori/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/positiveblue","download_url":"https://codeload.github.com/positiveblue/libDori/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239933067,"owners_count":19720728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["big-data","cpp","hpc","probabilistic-models","randomized-algorithms"],"created_at":"2024-11-08T11:54:57.113Z","updated_at":"2026-03-19T08:30:15.640Z","avatar_url":"https://github.com/positiveblue.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libDori\n\n![alt text](https://img.shields.io/badge/release-0.0.1-green.svg)\n[![Build Status](https://travis-ci.org/jomsdev/libDori.svg?branch=master)](https://travis-ci.org/jomsdev/libDori)\n[![Coverage Status](https://coveralls.io/repos/github/jomsdev/libDori/badge.svg?branch=master)](https://coveralls.io/github/jomsdev/libDori?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[TODO]: General description of the library\n\n## Examples\n\nlibDori can be used directly in a C++ project or or with the provided shell scripts and good old Unix IO redirection.\n\n- **CLI**:\n\n    The code for the command line programs can be found in the cli folder. They are built on top of the C++ library and expose \n    in a convenient way three of the basic features of libDori: Cardinality, Frequent items and Sampling.\n\n    - *Cardinality:* [Todo] \n\n    - *Frequent Items:* [Todo] \n\n    - *Sampling:* [Todo] \n\n    Run `cmd --help` for more information.\n\n- **C++ API**\n\n    Meanwhile a full API documentation is being developed this can be used as a first contact with the library and its interfaces.\n\n    - *Cardinality:*\n        ```cpp\n        // ICardinality is the interface for all the cardinality estimators.\n        // The algorithms implemented are: DummyCounter, HyperLogLog, KMV and Recordinality\n        dori::stream::ICardinality* estimator = new dori::stream::HyperLogLog(size);\n\n        // Process each of the elements with the offer method\n        std::string element;\n        while (file \u003e\u003e element)\n            // If you have the elements already hashed you can use the\n            // offerHash(hash) method instead\n            estimator-\u003eoffer(element);\n\n        // The cardinality mehtod offers an estiamtion of the real cardinality of the stream\n        std::cout \u003c\u003c \"Cardinality: \" \u003c\u003c estimator-\u003ecardinality() \u003c\u003c std::endl;\n\n        // The elementsOffered is a simple counter of how many elements had been offered\n        std::cout \u003c\u003c \"Total elements: \" \u003c\u003c estimator-\u003eelementsOffered() \u003c\u003c std::endl;\n        ```\n\n    - *Membership:*\n        ```cpp\n            // The bloom filter constructor take two params: \n            // - Number of distinct elements expected\n            // - Probability of failure\n            auto bf = dori::stream::BloomFilter(3000, 0.01);\n            \n            // We insert each one of the elements to the bloom filter\n            std::string element;\n            while (file \u003e\u003e element)\n                bf.insert(element);\n\n            // At any moment we can ask if one element has been inserted or not in the \n            // BloomFilter (False means always No, meanwhile yes has some failure probabilty) \n            bf.contains(\"libDori\");\n        ```\n    \n    - *Frequency:* [TODO]\n\n## Quick start\n\n- **Binaries:**\n\n    Pre-compiled binaries can be found on the downloads page (well, not yet).\n\n- **Build from source:**\n\n    First, you must download the libDori code from our [Git repository](https://github.com/jomsdev/libDori).\n\n    To clone the project from Git, `cd` to a suitable location and run\n    ```\n    git clone https://github.com/jomsdev/libDori.git\n    ```\n\n    This will clone the entire contents of the repository. You can check out to the current development branch\n    if you want to use the last stable version.\n\n    To update the project from within the project's folder, you can run the following command:\n    ```\n    git pull\n    ```\n\n    Once you have downloaded the source code, you can `cd` into the source code directory and build and install libDori with\n    ```\n    mkdir build\n    cd build\n    cmake ..\n    make\n    # it install the files under /usr/local\n    make install\n    ```\n\n    You can test the installation compiling test.cpp:\n\n    ```cpp\n    #include \u003cdori.hpp\u003e\n\n    int main() {\n        dori::stream::ICardinality* estimator = new dori::stream::HyperLogLog(64);\n    }\n    ```\n\n    Compile test.cpp with the follow command:\n\n    ```\n    clang++ -I /usr/local/include/libDori -o test test.cpp -lDori -std=c++11\n    ```\n\n    You should now be able to run `./test` without any problem.\n\n## Contributing\n\nFirst off, thanks for taking the time to contribute! \n\nNow, take a moment to be sure your contributions make sense \nto everyone else and please make sure to read the [Contributing Guide](https://github.com/jomsdev/libDori/blob/master/CONTRIBUTING.md)\nbefore making a pull request.\n\n## Issue tracker\n\nFound a problem? Want a new feature? First of all see if your issue or idea has [already been reported](../../issues).\nIf it hasn't, just open a [new clear and descriptive issue](../../issues/new).\n\n## License\n\n LibDori is under the MIT license. See the [LICENSE](https://github.com/jomsdev/libDori/blob/master/LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositiveblue%2Flibdori","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpositiveblue%2Flibdori","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositiveblue%2Flibdori/lists"}