[−][src]Struct randomize::PCG32
A permuted congruential generator with 32 bits of output per step.
Implementations
impl PCG32
[src]
pub const fn seed(seed: u64, inc: u64) -> Self
[src]
Seed a new generator.
pub fn from_getrandom() -> Self
[src]
This is supported on
feature="getrandom"
only.Generates a new PCG32 by calling getrandom
.
If getrandom
fails then you get the default generator.
pub fn next_u32(&mut self) -> u32
[src]
Runs the generator once and gets a u32
as output.
pub fn jump(&mut self, delta: u64)
[src]
Advances the generator delta
steps in log(delta)
time.
Trait Implementations
impl Clone for PCG32
[src]
impl Debug for PCG32
[src]
impl Default for PCG32
[src]
impl Eq for PCG32
[src]
impl From<[u64; 2]> for PCG32
[src]
impl Gen32 for PCG32
[src]
fn next_u32(&mut self) -> u32
[src]
fn next_u64(&mut self) -> u64
[src]
fn next_bool(&mut self) -> bool
[src]
fn next_u8(&mut self) -> u8
[src]
fn next_u16(&mut self) -> u16
[src]
fn next_f32_unit(&mut self) -> f32
[src]
fn next_f32_signed_unit(&mut self) -> f32
[src]
fn next_bounded(&mut self, b: u32) -> u32
[src]
fn dice(&mut self, count: i32, sides: i32) -> i32
[src]
fn step_ed4(&mut self, step: i32) -> i32
[src]
fn sundown_pool(&mut self, size: u32) -> u32
[src]
fn rn_bounded_luck(&mut self, x: i32, luck: i32) -> i32
[src]
fn rn_exponential_decay(&mut self, x: i32) -> i32
[src]
fn rn_z(&mut self, i: i32) -> i32
[src]
fn pick<T>(&mut self, buf: &[T]) -> T where
Self: Sized,
T: Copy,
[src]
Self: Sized,
T: Copy,
fn pick_ref<'b, T>(&mut self, buf: &'b [T]) -> &'b T where
Self: Sized,
[src]
Self: Sized,
fn pick_mut<'b, T>(&mut self, buf: &'b mut [T]) -> &'b mut T where
Self: Sized,
[src]
Self: Sized,
fn shuffle<T>(&mut self, buf: &mut [T]) where
Self: Sized,
[src]
Self: Sized,
impl Hash for PCG32
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<PCG32> for PCG32
[src]
impl StructuralEq for PCG32
[src]
impl StructuralPartialEq for PCG32
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,