pub struct PCG32 {
pub state: u64,
pub inc: u64,
}
Expand description
A Permuted Congruential Generator with 32-bit output.
- Period:
2**64
wheninc
is odd, otherwise less
Fields§
§state: u64
The generator’s state.
This changes with each step of the generator. It’s the generator’s “position” within the output stream.
inc: u64
The generator’s increment.
This doesn’t change as the generator advances. Instead it determines which
of the possible output streams the generator will use. Each inc
value
will give a different ordering of all the possible outputs.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PCG32
impl Send for PCG32
impl Sync for PCG32
impl Unpin for PCG32
impl UnwindSafe for PCG32
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