Struct vrp_core::prelude::DefaultRandom
source · pub struct DefaultRandom { /* private fields */ }
Expand description
A default random implementation.
Implementations§
source§impl DefaultRandom
impl DefaultRandom
sourcepub fn new_repeatable() -> DefaultRandom
pub fn new_repeatable() -> DefaultRandom
Creates an instance of DefaultRandom
with repeatable (predictable) random generation.
Trait Implementations§
source§impl Default for DefaultRandom
impl Default for DefaultRandom
source§fn default() -> DefaultRandom
fn default() -> DefaultRandom
Returns the “default value” for a type. Read more
source§impl Random for DefaultRandom
impl Random for DefaultRandom
source§fn uniform_int(&self, min: i32, max: i32) -> i32
fn uniform_int(&self, min: i32, max: i32) -> i32
Produces integral random value, uniformly distributed on the closed interval [min, max]
source§fn uniform_real(&self, min: f64, max: f64) -> f64
fn uniform_real(&self, min: f64, max: f64) -> f64
Produces real random value, uniformly distributed on the closed interval [min, max)
source§fn is_head_not_tails(&self) -> bool
fn is_head_not_tails(&self) -> bool
Flips a coin and returns true if it is “heads”, false otherwise.
Auto Trait Implementations§
impl RefUnwindSafe for DefaultRandom
impl Send for DefaultRandom
impl Sync for DefaultRandom
impl Unpin for DefaultRandom
impl UnwindSafe for DefaultRandom
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