pub struct Pareto<N> { /* private fields */ }
Expand description
Samples floating-point numbers according to the Pareto distribution
§Example
use rand::prelude::*;
use rand_distr::Pareto;
let val: f64 = thread_rng().sample(Pareto::new(1., 2.).unwrap());
println!("{}", val);
Implementations§
Trait Implementations§
Source§impl<N: Float> Distribution<N> for Pareto<N>where
OpenClosed01: Distribution<N>,
impl<N: Float> Distribution<N> for Pareto<N>where
OpenClosed01: Distribution<N>,
impl<N: Copy> Copy for Pareto<N>
Auto Trait Implementations§
impl<N> Freeze for Pareto<N>where
N: Freeze,
impl<N> RefUnwindSafe for Pareto<N>where
N: RefUnwindSafe,
impl<N> Send for Pareto<N>where
N: Send,
impl<N> Sync for Pareto<N>where
N: Sync,
impl<N> Unpin for Pareto<N>where
N: Unpin,
impl<N> UnwindSafe for Pareto<N>where
N: UnwindSafe,
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