pub struct RandState { /* private fields */ }Implementations§
Source§impl RandState
impl RandState
pub fn new() -> RandState
pub fn new_mt() -> RandState
pub fn new_lc_2exp(a: Mpz, c: u64, m2exp: u64) -> RandState
pub fn new_lc_2exp_size(size: u64) -> RandState
pub fn seed(&mut self, seed: Mpz)
pub fn seed_ui(&mut self, seed: u64)
Sourcepub fn urandom(&mut self, n: &Mpz) -> Mpz
pub fn urandom(&mut self, n: &Mpz) -> Mpz
Generate a uniform random integer in the range 0 to n-1, inclusive
Sourcepub fn urandom_2exp(&mut self, n: u64) -> Mpz
pub fn urandom_2exp(&mut self, n: u64) -> Mpz
Generate a uniformly distributed random integer in the range 0 to 2^n−1, inclusive.
Trait Implementations§
impl Send for RandState
impl Sync for RandState
Auto Trait Implementations§
impl Freeze for RandState
impl RefUnwindSafe for RandState
impl Unpin for RandState
impl UnwindSafe for RandState
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