pub struct LogNormal<N> { /* private fields */ }
Expand description
The log-normal distribution ln N(mean, std_dev**2)
.
If X
is log-normal distributed, then ln(X)
is N(mean, std_dev**2)
distributed.
§Example
use rand_distr::{LogNormal, Distribution};
// mean 2, standard deviation 3
let log_normal = LogNormal::new(2.0, 3.0).unwrap();
let v = log_normal.sample(&mut rand::thread_rng());
println!("{} is from an ln N(2, 9) distribution", v)
Implementations§
Trait Implementations§
Source§impl<N: Float> Distribution<N> for LogNormal<N>where
StandardNormal: Distribution<N>,
impl<N: Float> Distribution<N> for LogNormal<N>where
StandardNormal: Distribution<N>,
impl<N: Copy> Copy for LogNormal<N>
Auto Trait Implementations§
impl<N> Freeze for LogNormal<N>where
N: Freeze,
impl<N> RefUnwindSafe for LogNormal<N>where
N: RefUnwindSafe,
impl<N> Send for LogNormal<N>where
N: Send,
impl<N> Sync for LogNormal<N>where
N: Sync,
impl<N> Unpin for LogNormal<N>where
N: Unpin,
impl<N> UnwindSafe for LogNormal<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