Expand description

A deterministic randomizer with utility functions for operating on numbers and arrays in a reproducible and platform-indepdent way.

Structs

  • A DeterministicRandomizer contains utility functions for working with pseudorandom number generators (PRNGs) where reproducibility is important. While the rand crate has functionality for things like uniform sampling and shuffling that can be used with PRNGs, there is no guarantee that these functions will always be implemented in the same way across versions, which could lead to incompatibility or dependency troubles. This library has no specific rand dependency, and implements deterministic sampling and shuffling that are implemented in straightforward ways that will work identically across platforms. If you provide the same seed to the PRNG, you’ll get the same results. This can be useful for cases like consensus applications, when a set of clients need to agree on pseudorandom results.
  • Error representing a failed shuffle