pub struct SkewedGaussian;Expand description
Skewed Gaussian: a Gaussian modulated by an error-function skew factor.
A · exp(−½((x−c)/σ)²) · (1 + erf(γ·(x−c)/(σ·√2)))
Parameters (in order): [amplitude, center, sigma, gamma]
gammais the skewness:0⇒ symmetric Gaussian,γ>0⇒ tail toward highx,γ<0⇒ tail toward lowx. Useslibm::erf.
Trait Implementations§
Source§impl Model for SkewedGaussian
impl Model for SkewedGaussian
Source§fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
Analytical Jacobian of the skewed Gaussian.
Let g = exp(−½(dx/σ)²), β = γ/(σ√2), skew = 1 + erf(β·dx),
erf_d = (2/√π)·exp(−(β·dx)²) (the erf derivative factor).
∂f/∂A = g · skew ∂f/∂center = A·g · [ dx/σ² · skew − β · erf_d ] (∂dx/∂c = −1) ∂f/∂sigma = A·g · [ dx²/σ³ · skew − β·dx/σ · erf_d ] ∂f/∂gamma = A·g · [ dx/(σ√2) · erf_d ]
Source§fn jacobian_into(&self, x: &[f64], params: &[f64], out: &mut [f64])
fn jacobian_into(&self, x: &[f64], params: &[f64], out: &mut [f64])
Fill a pre-allocated slice with Jacobian values (one entry per parameter). Read more
Source§fn eval_slice_into(&self, xs: &[f64], params: &[f64], out: &mut [f64])
fn eval_slice_into(&self, xs: &[f64], params: &[f64], out: &mut [f64])
Batch evaluation of a 1-D model: fill
out[i] = eval([xs[i]], params). Read moreAuto Trait Implementations§
impl Freeze for SkewedGaussian
impl RefUnwindSafe for SkewedGaussian
impl Send for SkewedGaussian
impl Sync for SkewedGaussian
impl Unpin for SkewedGaussian
impl UnsafeUnpin for SkewedGaussian
impl UnwindSafe for SkewedGaussian
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