#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

#1198 in Algorithms

Download history 306683/week @ 2024-01-23 295213/week @ 2024-01-30 304419/week @ 2024-02-06 308250/week @ 2024-02-13 346630/week @ 2024-02-20 353218/week @ 2024-02-27 319098/week @ 2024-03-05 328212/week @ 2024-03-12 318952/week @ 2024-03-19 337802/week @ 2024-03-26 326465/week @ 2024-04-02 309443/week @ 2024-04-09 307846/week @ 2024-04-16 326631/week @ 2024-04-23 310323/week @ 2024-04-30 258219/week @ 2024-05-07

1,254,863 downloads per month
Used in 4,992 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
~12K SLoC