{"id":16936336,"url":"https://github.com/jonhoo/rust-zipf","last_synced_at":"2025-10-24T15:31:10.223Z","repository":{"id":55504913,"uuid":"79746453","full_name":"jonhoo/rust-zipf","owner":"jonhoo","description":"Rust implementation of a fast, bounded, Zipf-distributed random number generator","archived":false,"fork":false,"pushed_at":"2024-12-31T10:01:21.000Z","size":123,"stargazers_count":33,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-02T17:11:32.288Z","etag":null,"topics":["random-number-distributions","random-number-generators","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonhoo.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}},"created_at":"2017-01-22T21:19:36.000Z","updated_at":"2025-01-24T16:01:21.000Z","dependencies_parsed_at":"2024-02-03T10:23:58.961Z","dependency_job_id":"da86e3e8-2e0c-4c32-9a18-5ff8c652d0dd","html_url":"https://github.com/jonhoo/rust-zipf","commit_stats":{"total_commits":108,"total_committers":4,"mean_commits":27.0,"dds":"0.11111111111111116","last_synced_commit":"774eb4e859a8d727677664e56d529dc32e87c88c"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Frust-zipf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Frust-zipf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Frust-zipf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Frust-zipf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhoo","download_url":"https://codeload.github.com/jonhoo/rust-zipf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237870902,"owners_count":19379377,"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":["random-number-distributions","random-number-generators","rust"],"created_at":"2024-10-13T20:56:37.978Z","updated_at":"2025-10-24T15:31:04.912Z","avatar_url":"https://github.com/jonhoo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e This crate is deprecated. Prefer\n\u003e [`rand_distr::Zipf`](https://docs.rs/rand_distr/latest/rand_distr/struct.Zipf.html).\n\n---\n\n# rust-zipf\n\n[![Crates.io](https://img.shields.io/crates/v/zipf.svg)](https://crates.io/crates/zipf)\n[![Documentation](https://docs.rs/zipf/badge.svg)](https://docs.rs/zipf/)\n[![codecov](https://codecov.io/gh/jonhoo/rust-zipf/graph/badge.svg?token=IuYZGwTWik)](https://codecov.io/gh/jonhoo/rust-zipf)\n[![Dependency status](https://deps.rs/repo/github/jonhoo/rust-zipf/status.svg)](https://deps.rs/repo/github/jonhoo/rust-zipf)\n\nRust implementation of a fast, discrete, bounded,\n[Zipf-distributed](https://en.wikipedia.org/wiki/Zipf's_law) random\nnumber generator. Compared to the implementation provided by\n[`randomkit`](https://github.com/stygstra/rust-randomkit) (which binds\nto NumPy's fork of RandomKit), this crate is approximately twice as\nfast:\n\n```console\n$ cargo +nightly bench\ntest tests::bench_randomkit ... bench:         339 ns/iter (+/- 18)\ntest tests::bench_us        ... bench:          68 ns/iter (+/- 1)\ntest tests::bench_threadrng ... bench:          11 ns/iter (+/- 0)\n```\n\nIt is also both driven by, and provides, a [Rust random number\ngenerator](https://doc.rust-lang.org/rand/rand/trait.Rng.html).\n\nThis implementation is effectively a direct port of Apache Common's\n[RejectionInversionZipfSampler](https://github.com/apache/commons-rng/blob/6a1b0c16090912e8fc5de2c1fb5bd8490ac14699/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSampler.java),\nwritten in Java. It is based on the method described by Wolfgang Hörmann and Gerhard Derflinger\nin [*Rejection-inversion to generate variates from monotone discrete\ndistributions*](https://dl.acm.org/citation.cfm?id=235029) from *ACM Transactions on Modeling\nand Computer Simulation (TOMACS) 6.3 (1996)*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Frust-zipf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhoo%2Frust-zipf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Frust-zipf/lists"}