Struct rand_distr::Cauchy [−][src]
pub struct Cauchy<N> { /* fields omitted */ }The Cauchy distribution Cauchy(median, scale).
This distribution has a density function:
f(x) = 1 / (pi * scale * (1 + ((x - median) / scale)^2))
Example
use rand_distr::{Cauchy, Distribution}; let cau = Cauchy::new(2.0, 5.0).unwrap(); let v = cau.sample(&mut rand::thread_rng()); println!("{} is from a Cauchy(2, 5) distribution", v);
Implementations
impl<N: Float> Cauchy<N> where
Standard: Distribution<N>, [src]
impl<N: Float> Cauchy<N> where
Standard: Distribution<N>, [src]Trait Implementations
impl<N: Float> Distribution<N> for Cauchy<N> where
Standard: Distribution<N>, [src]
impl<N: Float> Distribution<N> for Cauchy<N> where
Standard: Distribution<N>, [src]impl<N: Copy> Copy for Cauchy<N>[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for Cauchy<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Cauchy<N> where
N: Send,
N: Send,
impl<N> Sync for Cauchy<N> where
N: Sync,
N: Sync,
impl<N> Unpin for Cauchy<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Cauchy<N> where
N: UnwindSafe,
N: UnwindSafe,