Struct ibig::rand::UniformUBig [−][src]
pub struct UniformUBig { /* fields omitted */ }
Uniform UBig distribution.
Example
use ibig::ubig; use rand::{distributions::uniform::Uniform, thread_rng, Rng}; let a = thread_rng().gen_range(ubig!(3)..ubig!(10)); let b = thread_rng().sample(Uniform::new(ubig!(0), &a)); assert!(a >= ubig!(3) && a < ubig!(10)); assert!(b >= ubig!(0) && b < a);
Trait Implementations
impl UniformSampler for UniformUBig
[src]
impl UniformSampler for UniformUBig
[src]type X = UBig
The type sampled by this implementation.
fn new<B1, B2>(low: B1, high: B2) -> UniformUBig where
B1: SampleBorrow<UBig>,
B2: SampleBorrow<UBig>,
[src]
B1: SampleBorrow<UBig>,
B2: SampleBorrow<UBig>,
fn new_inclusive<B1, B2>(low: B1, high: B2) -> UniformUBig where
B1: SampleBorrow<UBig>,
B2: SampleBorrow<UBig>,
[src]
B1: SampleBorrow<UBig>,
B2: SampleBorrow<UBig>,
fn sample<R: ?Sized>(&self, rng: &mut R) -> UBig where
R: Rng,
[src]
R: Rng,
pub fn sample_single<R, B1, B2>(low: B1, high: B2, rng: &mut R) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
[src]
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
pub fn sample_single_inclusive<R, B1, B2>(
low: B1,
high: B2,
rng: &mut R
) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
[src]
low: B1,
high: B2,
rng: &mut R
) -> Self::X where
R: Rng + ?Sized,
B1: SampleBorrow<Self::X>,
B2: SampleBorrow<Self::X>,
Auto Trait Implementations
impl RefUnwindSafe for UniformUBig
impl RefUnwindSafe for UniformUBig
impl Send for UniformUBig
impl Send for UniformUBig
impl Sync for UniformUBig
impl Sync for UniformUBig
impl Unpin for UniformUBig
impl Unpin for UniformUBig
impl UnwindSafe for UniformUBig
impl UnwindSafe for UniformUBig