pub struct Xoshiro256pp { /* private fields */ }Expand description
Rust implementation of the xoshiro256++ PRNG.
This generator is very fast, high-quality, and small, but not cryptographically secure.
More information can be found at: https://prng.di.unimi.it/.
Trait Implementations§
Source§impl Debug for Xoshiro256pp
impl Debug for Xoshiro256pp
Source§impl Default for Xoshiro256pp
impl Default for Xoshiro256pp
Source§impl Generator for Xoshiro256pp
impl Generator for Xoshiro256pp
Source§fn try_new() -> Result<Self, Error>
fn try_new() -> Result<Self, Error>
Creates a generator using randomness provided by the OS. Read more
Source§fn usize(&mut self) -> usize
fn usize(&mut self) -> usize
Returns a uniformly distributed
usize in the interval [0, usize::MAX].Source§fn bool(&mut self) -> bool
fn bool(&mut self) -> bool
A simple coinflip, returning a
bool that has a 50% chance of being true. Read moreSource§fn bound_inclusive(&mut self, max: u64) -> u64
fn bound_inclusive(&mut self, max: u64) -> u64
Source§fn f64_nonzero(&mut self) -> f64
fn f64_nonzero(&mut self) -> f64
Returns a uniformly distributed
f64 in the interval (0.0, 1.0].Source§fn f32_nonzero(&mut self) -> f32
fn f32_nonzero(&mut self) -> f32
Returns a uniformly distributed
f32 in the interval (0.0, 1.0].Source§fn f64_wide(&mut self) -> f64
fn f64_wide(&mut self) -> f64
Returns a uniformly distributed
f64 in the interval (-1.0, 1.0).Source§fn f32_wide(&mut self) -> f32
fn f32_wide(&mut self) -> f32
Returns a uniformly distributed
f32 in the interval (-1.0, 1.0).Source§fn f64_normal(&mut self) -> (f64, f64)
fn f64_normal(&mut self) -> (f64, f64)
Returns two indepedent and normally distributed
f64 values with
a mean of 0.0 and a stddev of 1.0.Source§fn f64_normal_distribution(&mut self, mean: f64, stddev: f64) -> (f64, f64)
fn f64_normal_distribution(&mut self, mean: f64, stddev: f64) -> (f64, f64)
Returns two indepedent and normally distributed
f64 values with
user-defined mean and stddev. Read moreSource§fn f64_exponential(&mut self) -> f64
fn f64_exponential(&mut self) -> f64
Returns an exponentially distributed
f64 with a lambda of 1.0.Source§fn f64_exponential_lambda(&mut self, lambda: f64) -> f64
fn f64_exponential_lambda(&mut self, lambda: f64) -> f64
Source§fn choose<C>(&mut self, collection: C) -> Option<C::Item>
fn choose<C>(&mut self, collection: C) -> Option<C::Item>
Returns a randomly chosen item from the iterator of
collection. Read moreSource§fn ascii_alphabetic(&mut self) -> char
fn ascii_alphabetic(&mut self) -> char
Returns a randomly selected ASCII character from the pool of: Read more
Source§fn ascii_uppercase(&mut self) -> char
fn ascii_uppercase(&mut self) -> char
Returns a randomly selected ASCII character from the pool of: Read more
Source§fn ascii_lowercase(&mut self) -> char
fn ascii_lowercase(&mut self) -> char
Returns a randomly selected ASCII character from the pool of: Read more
Source§fn ascii_alphanumeric(&mut self) -> char
fn ascii_alphanumeric(&mut self) -> char
Returns a randomly selected ASCII character from the pool of: Read more
Source§fn ascii_digit(&mut self) -> char
fn ascii_digit(&mut self) -> char
Returns a randomly selected ASCII character from the pool of: Read more
Source§fn shuffle<T>(&mut self, slice: &mut [T])
fn shuffle<T>(&mut self, slice: &mut [T])
Performs a Fisher-Yates shuffle on the contents of
slice. Read moreSource§impl PartialEq for Xoshiro256pp
impl PartialEq for Xoshiro256pp
Source§impl SeedableGenerator for Xoshiro256pp
impl SeedableGenerator for Xoshiro256pp
Source§fn new_with_seed(seed: u64) -> Self
fn new_with_seed(seed: u64) -> Self
Creates a generator from the output of an internal PRNG,
which is itself seeded from
seed. Read moreimpl Eq for Xoshiro256pp
impl StructuralPartialEq for Xoshiro256pp
Auto Trait Implementations§
impl Freeze for Xoshiro256pp
impl RefUnwindSafe for Xoshiro256pp
impl Send for Xoshiro256pp
impl Sync for Xoshiro256pp
impl Unpin for Xoshiro256pp
impl UnwindSafe for Xoshiro256pp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more