Struct ibig::UniformIBig [−][src]
Uniform IBig
distribution.
Example
use ibig::prelude::*; use rand::prelude::*; use rand::distributions::uniform::Uniform; let a = thread_rng().gen_range(ibig!(3)..ibig!(10)); let b = thread_rng().sample(Uniform::new(ibig!(-5), &a)); assert!(a >= ibig!(3) && a < ibig!(10)); assert!(b >= ibig!(-5) && b < a);
Trait Implementations
impl UniformSampler for UniformIBig
[src]
type X = IBig
The type sampled by this implementation.
fn new<B1, B2>(low: B1, high: B2) -> UniformIBig where
B1: SampleBorrow<IBig>,
B2: SampleBorrow<IBig>,
[src]
B1: SampleBorrow<IBig>,
B2: SampleBorrow<IBig>,
fn new_inclusive<B1, B2>(low: B1, high: B2) -> UniformIBig where
B1: SampleBorrow<IBig>,
B2: SampleBorrow<IBig>,
[src]
B1: SampleBorrow<IBig>,
B2: SampleBorrow<IBig>,
fn sample<R: ?Sized>(&self, rng: &mut R) -> IBig 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 UniformIBig
impl Send for UniformIBig
impl Sync for UniformIBig
impl Unpin for UniformIBig
impl UnwindSafe for UniformIBig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,