pub struct Frechet<F>{ /* private fields */ }
Expand description
The Fréchet distribution Fréchet(α, μ, σ)
.
The Fréchet distribution is a continuous probability distribution
with location parameter μ
(mu
), scale parameter σ
(sigma
),
and shape parameter α
(alpha
). It describes the distribution
of the maximum (or minimum) of a number of random variables.
It is also known as the Type II extreme value distribution.
§Density function
f(x) = [(x - μ) / σ]^(-1 - α) exp[-(x - μ) / σ]^(-α) α / σ
§Plot
The plot shows the Fréchet distribution with various values of μ
, σ
, and α
.
Note how the location parameter μ
shifts the distribution along the x-axis,
the scale parameter σ
stretches or compresses the distribution along the x-axis,
and the shape parameter α
changes the tail behavior.
§Example
use rand::prelude::*;
use rand_distr::Frechet;
let val: f64 = rand::rng().sample(Frechet::new(0.0, 1.0, 1.0).unwrap());
println!("{}", val);
Implementations§
Trait Implementations§
Source§impl<'de, F> Deserialize<'de> for Frechet<F>
impl<'de, F> Deserialize<'de> for Frechet<F>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F> Distribution<F> for Frechet<F>
impl<F> Distribution<F> for Frechet<F>
impl<F> Copy for Frechet<F>
impl<F> StructuralPartialEq 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