{"id":15068147,"url":"https://github.com/depermitto/randshow","last_synced_at":"2026-02-12T02:33:18.638Z","repository":{"id":212938771,"uuid":"732650144","full_name":"Depermitto/randshow","owner":"Depermitto","description":"Header-only compendium of RNGs for C++","archived":false,"fork":false,"pushed_at":"2024-07-21T15:44:54.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T12:14:23.104Z","etag":null,"topics":["cpp","cpp11","cpp11-library","header-only","library","random-number-generators"],"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/Depermitto.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2023-12-17T11:54:26.000Z","updated_at":"2024-11-14T15:29:36.000Z","dependencies_parsed_at":"2024-07-25T21:46:55.015Z","dependency_job_id":null,"html_url":"https://github.com/Depermitto/randshow","commit_stats":null,"previous_names":["depermitto/randshow"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Depermitto/randshow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Depermitto%2Frandshow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Depermitto%2Frandshow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Depermitto%2Frandshow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Depermitto%2Frandshow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Depermitto","download_url":"https://codeload.github.com/Depermitto/randshow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Depermitto%2Frandshow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273467735,"owners_count":25111133,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cpp11","cpp11-library","header-only","library","random-number-generators"],"created_at":"2024-09-25T01:31:31.273Z","updated_at":"2026-02-12T02:33:18.611Z","avatar_url":"https://github.com/Depermitto.png","language":"C++","readme":"# Header-only library with many RNGs for **C++**\n\n\u003e Quality tested using [PractRand](https://pracrand.sourceforge.net/)\n\n# Capabilities\n\nRandshow aims to be smoother in use and 'more random' that engines found in the _\\\u003crandom\\\u003e_ header of C++11. It ensures compatibility with [`UniformRandomBitGenerator`](https://en.cppreference.com/w/cpp/named_req/UniformRandomBitGenerator) and C++11 _\\\u003crandom\\\u003e_ distributions.\n\n# Usage\n\nDownload the contents of the _include_ directory and include desired headers in your code.\n\n## Engines\n\n\u003e **\u003crandshow/engines.hpp\u003e**\n\n- [PCG](https://www.pcg-random.org/) with 64-bit state and 32-bit output as well as a variant with 128-bit state and 64-bit output.\n- [Xoshiro256++](https://prng.di.unimi.it/)\n- [SplitMix64](https://rosettacode.org/wiki/Pseudo-random_numbers/Splitmix64#bodyContent)\n- [LCG](https://en.wikipedia.org/wiki/Linear_congruential_generator?useskin=vector)\n\n## Distributions\n\n\u003e **\u003crandshow/distributions.hpp\u003e**\n\n- [Zipf Distribution](https://en.wikipedia.org/wiki/Zipf%27s_law?useskin=vector)\n- [Benford's Distribution](https://en.wikipedia.org/wiki/Benford%27s_law?useskin=vector)\n\n## Examples\n\n```C++\nrandshow::PCG32 rng(17)                 // Custom seed\nuint32_t num = rng.Next()               // Random 32-bit unsigned integer\nuint32_t num_4_17 = rng.Next(4, 17);    // Equivalent to creating a new std::uniform_int_distribution\ndouble_t num_0_1 = rng.NextReal();      // Random number in (0.0, 1.0) range\n```\n\n```C++\n// Create a histogram in Poisson distribution\nrandshow::PCG32 rng{};\nstd::unordered_map\u003cint, int\u003e counter{};\nstd::poisson_distribution\u003c\u003e dist{10};\n\nfor (int n = 1000; n--;) {\n    counter[dist(rng)] += 1;\n}\n\nfor (size_t i = counter.size(); i--;) {\n    std::string count(counter[i], '*');\n    std::cout \u003c\u003c i \u003c\u003c \": \" \u003c\u003c count \u003c\u003c \"\\n\";\n}\n```\n\n# License\n\nLicensed under the MIT license\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepermitto%2Frandshow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdepermitto%2Frandshow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdepermitto%2Frandshow/lists"}