Struct ibig::UniformUBig [−][src]
Uniform UBig
distribution.
Example
use ibig::prelude::*; use rand::prelude::*; use rand::distributions::uniform::Uniform; 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]
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 Send for UniformUBig
impl Sync for UniformUBig
impl Unpin for UniformUBig
impl UnwindSafe for UniformUBig
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>,