{"id":18320169,"url":"https://github.com/martin-majlis/probstructs","last_synced_at":"2025-04-09T14:23:59.450Z","repository":{"id":138194448,"uuid":"283398303","full_name":"martin-majlis/probstructs","owner":"martin-majlis","description":"Collection of probabilistic data structures - CM-Sketch, ECM-Sketch, exponential histogram in C++.","archived":false,"fork":false,"pushed_at":"2024-07-10T08:55:12.000Z","size":79,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T08:24:23.465Z","etag":null,"topics":["cpp","data-structures","probabilistic-programming","streaming"],"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/martin-majlis.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"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":"2020-07-29T04:31:48.000Z","updated_at":"2020-12-04T07:32:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab53cb24-735f-4c49-b3fd-886ca7e0d751","html_url":"https://github.com/martin-majlis/probstructs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-majlis%2Fprobstructs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-majlis%2Fprobstructs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-majlis%2Fprobstructs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martin-majlis%2Fprobstructs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martin-majlis","download_url":"https://codeload.github.com/martin-majlis/probstructs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054355,"owners_count":21039984,"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":["cpp","data-structures","probabilistic-programming","streaming"],"created_at":"2024-11-05T18:15:26.223Z","updated_at":"2025-04-09T14:23:59.430Z","avatar_url":"https://github.com/martin-majlis.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Probabilistic Structures\n========================\n\n`ProbStructs` as easy to use C++ library with probabilistic structures.\n\n|build-status| |docs| |github-stars-flat|\n\nDocumentation\n-------------\n\nFull documentation is available at http://probstructs.readthedocs.io/en/latest/\n\nClasses\n-------\n\n* `CountMinSketch`_ - frequency table of events in a stream\n* `ExponentialHistorgram`_ - frequency of specific event in the last N elements from a stream\n* `ExponentialCountMinSketch`_ - frequency table of events in the last N elements from a stream\n* `Hash`_ - hashing function\n\n.. _CountMinSketch: https://probstructs.readthedocs.io/en/latest/classes.html#countminsketch\n.. _ExponentialHistorgram: https://probstructs.readthedocs.io/en/latest/classes.html#exponentialhistorgram\n.. _ExponentialCountMinSketch: https://probstructs.readthedocs.io/en/latest/classes.html#exponentialcountminsketch\n.. _Hash: https://probstructs.readthedocs.io/en/latest/classes.html#hash\n\nExample\n-------\n\n.. code-block:: c++\n\n    using namespace probstructs;\n\n    ExponentialCountMinSketch\u003cint\u003e sketch(100, 4, 8);\n\n    uint ts = 0;\n\n    ts = 0;\n    sketch.inc(\"aaa\", ts, 1);\n    sketch.inc(std::string(\"bbb\"), ts, 4);\n    sketch.inc(\"ccc\", ts, 8);\n\n    std::cerr \u003c\u003c sketch.get(std::string(\"aaa\"), 4, ts) \u003c\u003c std::endl;\n    // 1\n\n    std::cerr \u003c\u003c sketch.get(\"bbb\", 4, ts) \u003c\u003c std::endl;\n    // 4\n\n    std::cerr \u003c\u003c sketch.get(\"ccc\", 4, ts) \u003c\u003c std::endl;\n    // 8\n\n    std::cerr \u003c\u003c sketch.get(\"ddd\", 4, ts) \u003c\u003c std::endl;\n    // 0\n\n    ts = 4;\n    std::cerr \u003c\u003c sketch.get(\"aaa\", 2, ts) \u003c\u003c std::endl;\n    // 0\n    std::cerr \u003c\u003c sketch.get(\"bbb\", 2, ts) \u003c\u003c std::endl;\n    // 0\n    std::cerr \u003c\u003c sketch.get(std::string(\"ccc\"), 2, ts) \u003c\u003c std::endl;\n    // 0\n    std::cerr \u003c\u003c sketch.get(\"ddd\", 2, ts) \u003c\u003c std::endl;\n    // 0\n\n    std::cerr \u003c\u003c sketch.get(\"aaa\", 8, ts) \u003c\u003c std::endl;\n    // 1\n    std::cerr \u003c\u003c sketch.get(\"bbb\", 8, ts) \u003c\u003c std::endl;\n    // 4\n    std::cerr \u003c\u003c sketch.get(\"ccc\", 8, ts) \u003c\u003c std::endl;\n    // 8\n    std::cerr \u003c\u003c sketch.get(\"ddd\", 8, ts) \u003c\u003c std::endl;\n    // 0\n\n\n\n.. |build-status| image:: https://travis-ci.org/martin-majlis/probstructs.svg?branch=master\n    :alt: build status\n    :target: https://travis-ci.org/martin-majlis/probstructs\n\n.. |docs| image:: https://readthedocs.org/projects/probstructs/badge/?version=latest\n    :target: http://probstructs.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. |github-stars-flat| image:: https://img.shields.io/github/stars/martin-majlis/probstructs.svg?style=flat\u0026label=Stars\n\t:target: https://github.com/martin-majlis/probstructs/\n\t:alt: GitHub stars","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartin-majlis%2Fprobstructs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartin-majlis%2Fprobstructs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartin-majlis%2Fprobstructs/lists"}