Struct geng::prelude::UniformReal
pub struct UniformReal<T>(/* private fields */)
where
T: SampleUniform;
Expand description
Uniform RealImpl sampler
Trait Implementations§
§impl<T> UniformSampler for UniformReal<T>where
T: Float + SampleUniform,
impl<T> UniformSampler for UniformReal<T>where
T: Float + SampleUniform,
§fn new<B1, B2>(low: B1, high: B2) -> UniformReal<T>where
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
fn new<B1, B2>(low: B1, high: B2) -> UniformReal<T>where
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
Construct self, with inclusive lower bound and exclusive upper bound
[low, high)
. Read more§fn new_inclusive<B1, B2>(low: B1, high: B2) -> UniformReal<T>where
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
fn new_inclusive<B1, B2>(low: B1, high: B2) -> UniformReal<T>where
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
Construct self, with inclusive bounds
[low, high]
. Read more§fn sample<R>(&self, rng: &mut R) -> <UniformReal<T> as UniformSampler>::X
fn sample<R>(&self, rng: &mut R) -> <UniformReal<T> as UniformSampler>::X
Sample a value.
§fn sample_single<R, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> <UniformReal<T> as UniformSampler>::Xwhere
R: Rng + ?Sized,
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
fn sample_single<R, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> <UniformReal<T> as UniformSampler>::Xwhere
R: Rng + ?Sized,
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
Sample a single value uniformly from a range with inclusive lower bound
and exclusive upper bound
[low, high)
. Read more§fn sample_single_inclusive<R, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> <UniformReal<T> as UniformSampler>::Xwhere
R: Rng + ?Sized,
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
fn sample_single_inclusive<R, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> <UniformReal<T> as UniformSampler>::Xwhere
R: Rng + ?Sized,
B1: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
B2: SampleBorrow<<UniformReal<T> as UniformSampler>::X>,
Sample a single value uniformly from a range with inclusive lower bound
and inclusive upper bound
[low, high]
. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for UniformReal<T>
impl<T> Send for UniformReal<T>
impl<T> Sync for UniformReal<T>
impl<T> Unpin for UniformReal<T>
impl<T> UnwindSafe for UniformReal<T>
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.