pub struct NormalInverseGaussian<F>{ /* private fields */ }
Expand description
The normal-inverse Gaussian distribution NIG(α, β)
.
This is a continuous probability distribution with two parameters,
α
(alpha
) and β
(beta
), defined in (-∞, ∞)
.
It is also known as the normal-Wald distribution.
§Plot
The following plot shows the normal-inverse Gaussian distribution with various values of α
and β
.
§Example
use rand_distr::{NormalInverseGaussian, Distribution};
let norm_inv_gauss = NormalInverseGaussian::new(2.0, 1.0).unwrap();
let v = norm_inv_gauss.sample(&mut rand::rng());
println!("{} is from a normal-inverse Gaussian(2, 1) distribution", v);
Implementations§
Source§impl<F> NormalInverseGaussian<F>
impl<F> NormalInverseGaussian<F>
Sourcepub fn new(alpha: F, beta: F) -> Result<NormalInverseGaussian<F>, Error>
pub fn new(alpha: F, beta: F) -> Result<NormalInverseGaussian<F>, Error>
Construct a new NormalInverseGaussian
distribution with the given alpha (tail heaviness) and
beta (asymmetry) parameters.
Trait Implementations§
Source§impl<F> Clone for NormalInverseGaussian<F>
impl<F> Clone for NormalInverseGaussian<F>
Source§fn clone(&self) -> NormalInverseGaussian<F>
fn clone(&self) -> NormalInverseGaussian<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F> Debug for NormalInverseGaussian<F>
impl<F> Debug for NormalInverseGaussian<F>
Source§impl<'de, F> Deserialize<'de> for NormalInverseGaussian<F>where
F: Float + Deserialize<'de>,
StandardNormal: Distribution<F>,
StandardUniform: Distribution<F>,
impl<'de, F> Deserialize<'de> for NormalInverseGaussian<F>where
F: Float + Deserialize<'de>,
StandardNormal: Distribution<F>,
StandardUniform: Distribution<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 NormalInverseGaussian<F>
impl<F> Distribution<F> for NormalInverseGaussian<F>
Source§impl<F> PartialEq for NormalInverseGaussian<F>
impl<F> PartialEq for NormalInverseGaussian<F>
Source§impl<F> Serialize for NormalInverseGaussian<F>
impl<F> Serialize for NormalInverseGaussian<F>
impl<F> Copy for NormalInverseGaussian<F>
impl<F> StructuralPartialEq for NormalInverseGaussian<F>
Auto Trait Implementations§
impl<F> Freeze for NormalInverseGaussian<F>where
F: Freeze,
impl<F> RefUnwindSafe for NormalInverseGaussian<F>where
F: RefUnwindSafe,
impl<F> Send for NormalInverseGaussian<F>where
F: Send,
impl<F> Sync for NormalInverseGaussian<F>where
F: Sync,
impl<F> Unpin for NormalInverseGaussian<F>where
F: Unpin,
impl<F> UnwindSafe for NormalInverseGaussian<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