#random #pcg

no-std rand_pcg

Selected PCG random number generators

9 releases

0.9.0-alpha.1 Mar 18, 2024
0.9.0-alpha.0 Feb 18, 2024
0.3.1 Jun 15, 2021
0.3.0 Dec 14, 2020
0.1.1 Oct 5, 2018

#720 in Algorithms

Download history 307006/week @ 2024-01-21 298512/week @ 2024-01-28 299402/week @ 2024-02-04 316167/week @ 2024-02-11 323390/week @ 2024-02-18 369296/week @ 2024-02-25 311465/week @ 2024-03-03 330786/week @ 2024-03-10 319768/week @ 2024-03-17 331983/week @ 2024-03-24 337845/week @ 2024-03-31 306590/week @ 2024-04-07 308838/week @ 2024-04-14 322680/week @ 2024-04-21 311229/week @ 2024-04-28 311148/week @ 2024-05-05

1,274,995 downloads per month
Used in 4,989 crates (192 directly)

MIT/Apache

93KB
1K SLoC

rand_pcg

Test Status Latest version Book API API Minimum rustc version

Implements a selection of PCG random number generators.

PCG is a family of simple fast space-efficient statistically good algorithms for random number generation. [Melissa O'Neill, Harvey Mudd College, 2014].

The PCG algorithms are not suitable for cryptographic uses, but perform well in statistical tests, use little memory and are fairly fast. See the pcg-random website.

This crate depends on rand_core and is part of the Rand project.

Links:

Crate Features

rand_pcg is no_std compatible by default.

The serde1 feature includes implementations of Serialize and Deserialize for the included RNGs.

License

rand_pcg is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.

Dependencies

~1MB
~13K SLoC