#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

#1299 in Algorithms

Download history 165378/week @ 2023-12-22 196252/week @ 2023-12-29 278484/week @ 2024-01-05 268851/week @ 2024-01-12 312229/week @ 2024-01-19 292532/week @ 2024-01-26 296822/week @ 2024-02-02 326738/week @ 2024-02-09 301271/week @ 2024-02-16 370618/week @ 2024-02-23 322118/week @ 2024-03-01 329279/week @ 2024-03-08 323716/week @ 2024-03-15 319612/week @ 2024-03-22 348669/week @ 2024-03-29 248650/week @ 2024-04-05

1,298,100 downloads per month
Used in 4,985 crates (191 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