Struct ndarray_rand::rand_distr::Frechet
source · pub struct Frechet<F>{ /* private fields */ }
Expand description
Samples floating-point numbers according to the Fréchet distribution
This distribution has density function:
f(x) = [(x - μ) / σ]^(-1 - α) exp[-(x - μ) / σ]^(-α) α / σ
,
where μ
is the location parameter, σ
the scale parameter, and α
the shape parameter.
§Example
use rand::prelude::*;
use rand_distr::Frechet;
let val: f64 = thread_rng().sample(Frechet::new(0.0, 1.0, 1.0).unwrap());
println!("{}", val);
Implementations§
Trait Implementations§
source§impl<F> Distribution<F> for Frechet<F>
impl<F> Distribution<F> for Frechet<F>
impl<F> Copy for Frechet<F>
Auto Trait Implementations§
impl<F> Freeze for Frechet<F>where
F: Freeze,
impl<F> RefUnwindSafe for Frechet<F>where
F: RefUnwindSafe,
impl<F> Send for Frechet<F>where
F: Send,
impl<F> Sync for Frechet<F>where
F: Sync,
impl<F> Unpin for Frechet<F>where
F: Unpin,
impl<F> UnwindSafe for Frechet<F>where
F: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)