pub struct UniformIBig { /* private fields */ }
Expand description

Uniform IBig distribution.

Example

use ibig::ibig;
use rand::{distributions::uniform::Uniform, thread_rng, Rng};
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

The type sampled by this implementation.
Construct self, with inclusive lower bound and exclusive upper bound [low, high). Read more
Construct self, with inclusive bounds [low, high]. Read more
Sample a value.
Sample a single value uniformly from a range with inclusive lower bound and exclusive upper bound [low, high). Read more
Sample a single value uniformly from a range with inclusive lower bound and inclusive upper bound [low, high]. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.