Registry / utility / zipf
library7.0.2rscratesunverified

A fast generator of discrete, bounded Zipf-distributed random numbers.

# Cargo.toml [dependencies] zipf = "7.0.2"
INSTALL
IMPORT
SIG · ZIPF
Z
zipf
utilityrustv7.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZipfDistribution
use zipf::ZipfDistribution;

Generates a random number following a Zipf distribution with N=100 and exponent=1.5.

use zipf::ZipfDistribution; use rand::Rng; fn main() { let mut rng = rand::thread_rng(); let zipf = ZipfDistribution::new(100, 1.5).unwrap(); let sample = rng.sample(&zipf); println!("{}", sample); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
7.0.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
26
Resources
zipf — cargo add zipf · libregistry