pub struct LogNormal { /* 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 sgx_rand::distributions::{LogNormal, IndependentSample};
// mean 2, standard deviation 3
let log_normal = LogNormal::new(2.0, 3.0);
let v = log_normal.ind_sample(&mut sgx_rand::thread_rng());
println!("{} is from an ln N(2, 9) distribution", v)
Implementations
Trait Implementations
sourceimpl IndependentSample<f64> for LogNormal
impl IndependentSample<f64> for LogNormal
sourcefn ind_sample<R: Rng>(&self, rng: &mut R) -> f64
fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64
Generate a random value.
impl Copy for LogNormal
Auto Trait Implementations
impl RefUnwindSafe for LogNormal
impl Send for LogNormal
impl Sync for LogNormal
impl Unpin for LogNormal
impl UnwindSafe for LogNormal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more