Crates.io | pcg_rand |
lib.rs | pcg_rand |
version | 0.13.0 |
source | src |
created_at | 2015-10-23 02:57:16.368346 |
updated_at | 2021-02-02 22:58:55.977593 |
description | An implementation of the PCG family of random number generators in pure Rust |
homepage | https://github.com/robojeb/pcg_rand |
repository | https://github.com/robojeb/pcg_rand |
max_upload_size | |
id | 3289 |
size | 102,461 |
To use this library add the following to your Cargo.toml
pcg_rand = "0.13.0"
PCG stands for Permuted Congruential generators. They are a simple family of random number generators which use the much denounced Linear Congruential Generator as a base. To overcome the well known limitations of the LCG Generator the PCG family utilizes permutation functions to permute the output. More information about PCG can be found here.
This library currently provides 32 and 64 bit generators. It provides the major "stream" types, including the unique stream which is determined by their current location in memory.
rand: 0.5
crate which involves new methods. Most of the functions
are now not based on macro's but instead are fully generic and utilize the
num-traits
wrapping traits as needed. Additionally the crate now has support
for using the native u128
since that is stable in Rust now. This pushes the
minimum Rust version to 1.26.new_unseeded
function so that
it can be useful for testing. Improved the docs to suggest seeding and updated
the documentation examples to use from_entropy
instead of new_unseeded
to
promote good use of the generators.u128
and experimental serde1
support. Also fixed an issue in 0.9.2
which caused it to be nightly only
(oops). Started migrating benchmarks to critereon.rand 0.6
and rand_core 0.3
. Fixed an issue where
tests wouldn't run if there was no u128
support. Serde support is still
highly experimental.rand 0.7
and rand_core 0.5
bin
to examples
for
better discovery. Changed the serialization derivation, it only makes sense
to deserialize into a SetSeq
type so it is the only one which supports
deserialization. The serialization step writes out the internal state as
an array and does not record any information about the type of generator.no_deserialize_verify
feature.