pub struct Xoshiro512pp { /* private fields */ }Expand description
Rust implementation of the xoshiro512++ PRNG. This generator is 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 Xoshiro512pp
impl Debug for Xoshiro512pp
Source§impl Default for Xoshiro512pp
impl Default for Xoshiro512pp
Source§impl Generator for Xoshiro512pp
impl Generator for Xoshiro512pp
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 bits(&mut self, bit_count: u32) -> u64
fn bits(&mut self, bit_count: u32) -> u64
Returns a uniformly distributed u64 in the interval [0, 2
bit_count).Source§fn bound(&mut self, bound: u64) -> u64
fn bound(&mut self, bound: u64) -> u64
Returns a uniformly distributed u64 in the interval [0,
bound). Read moreSource§fn bound_inclusive(&mut self, bound: u64) -> u64
fn bound_inclusive(&mut self, bound: u64) -> u64
Returns a uniformly distributed u64 in the interval [0,
bound]. Read moreSource§fn range(&mut self, start: i64, end: i64) -> i64
fn range(&mut self, start: i64, end: i64) -> i64
Returns a uniformly distributed i64 in the interval [
start, end)Source§fn range_inclusive(&mut self, start: i64, end: i64) -> i64
fn range_inclusive(&mut self, start: i64, end: i64) -> i64
Returns a uniformly distributed i64 in the interval [
start, end]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
mean = 0 and stddev = 1.
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.Source§fn f64_exponential(&mut self) -> f64
fn f64_exponential(&mut self) -> f64
Returns an exponentially distributed f64 with lambda = 1.
Source§fn f64_exponential_lambda(&mut self, lambda: f64) -> f64
fn f64_exponential_lambda(&mut self, lambda: f64) -> f64
Returns an exponentially distributed f64 with user-defined
lambda.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 alphabetic character.
Source§fn ascii_uppercase(&mut self) -> char
fn ascii_uppercase(&mut self) -> char
Returns a randomly selected ASCII uppercase character.
Source§fn ascii_lowercase(&mut self) -> char
fn ascii_lowercase(&mut self) -> char
Returns a randomly selected ASCII lowercase character.
Source§fn ascii_alphanumeric(&mut self) -> char
fn ascii_alphanumeric(&mut self) -> char
Returns a randomly selected ASCII alphanumeric character.
Source§fn ascii_digit(&mut self) -> char
fn ascii_digit(&mut self) -> char
Returns a randomly selected ASCII digit character.
Source§impl PartialEq for Xoshiro512pp
impl PartialEq for Xoshiro512pp
Source§impl SeedableGenerator for Xoshiro512pp
impl SeedableGenerator for Xoshiro512pp
Source§fn new_with_seed(seed: u64) -> Self
fn new_with_seed(seed: u64) -> Self
Creates a generator from the output of an internal SplitMix64 generator,
which is itself seeded using
seed. Read moreimpl Eq for Xoshiro512pp
impl StructuralPartialEq for Xoshiro512pp
Auto Trait Implementations§
impl Freeze for Xoshiro512pp
impl RefUnwindSafe for Xoshiro512pp
impl Send for Xoshiro512pp
impl Sync for Xoshiro512pp
impl Unpin for Xoshiro512pp
impl UnwindSafe for Xoshiro512pp
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