pub struct Random { /* private fields */ }
Implementations§
Source§impl Random
impl Random
pub fn with_seed(s: u64) -> Random
pub fn with_seed_and_lcg(s: u64, lcg: LCG) -> Random
pub fn with_raw_seed(s: u64) -> Random
pub fn with_raw_seed_and_lcg(s: u64, lcg: LCG) -> Random
pub fn default_scramble(s: u64) -> u64
pub fn set_seed(&mut self, s: u64)
pub fn set_raw_seed(&mut self, s: u64)
pub fn get_seed(&self) -> u64
pub fn get_raw_seed(&self) -> u64
pub fn advance(&mut self, lcg: LCG) -> Random
pub fn next_state(&mut self) -> Random
pub fn next_state_n(&mut self, n: u32) -> Random
pub fn skip(&mut self, skip_random: Random) -> Random
pub fn next(&mut self, bits: u8) -> i32
pub fn next_int(&mut self) -> i32
pub fn next_int_n(&mut self, n: i32) -> i32
pub fn next_long(&mut self) -> i64
pub fn next_boolean(&mut self) -> bool
pub fn next_float(&mut self) -> f32
pub fn next_double(&mut self) -> f64
pub fn previous(&mut self)
pub fn previous_state(s: u64) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Random
impl RefUnwindSafe for Random
impl Send for Random
impl Sync for Random
impl Unpin for Random
impl UnwindSafe for Random
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