Struct zipf::ZipfDistribution
[−]
[src]
pub struct ZipfDistribution { /* fields omitted */ }
Random number generator that generates Zipf-distributed random numbers using rejection inversion.
Methods
impl ZipfDistribution
[src]
pub fn new(num_elements: usize, exponent: f64) -> Result<Self, ()>
[src]
Creates a new Zipf-distributed random number generator.
Note that both the number of elements and the exponent must be greater than 0.
Trait Implementations
impl Sample<isize> for ZipfDistribution
[src]
fn sample<R: Rng>(&mut self, rng: &mut R) -> isize
[src]
Generate a random value of Support
, using rng
as the source of randomness. Read more