pub struct ZipfFast { /* private fields */ }
Expand description
A fast Zipf distribution generator.
This generator takes an exponent
and a start
value.
The start
is typically set to 1, and the exponent is
typically set to something slightly larger than 1 (like
1.1)
Increasing exponent
reduces the likelihood of larger
return values. Increasing start
increases the likelihood
of larger return values.
Algorithm from: “Rejection-Inversion to Generate Variates from Monotone Discrete Distributions” http://eeyore.wu-wien.ac.at/papers/96-04-04.wh-der.ps.gz
Implementations§
Trait Implementations§
Source§impl Distribution<u64> for ZipfFast
impl Distribution<u64> for ZipfFast
Auto Trait Implementations§
impl Freeze for ZipfFast
impl RefUnwindSafe for ZipfFast
impl Send for ZipfFast
impl Sync for ZipfFast
impl Unpin for ZipfFast
impl UnwindSafe for ZipfFast
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more