pub struct PseudoVoigt;Expand description
Proper Pseudo-Voigt: η · L(x) + (1 − η) · G(x)
where η ∈ [0,1] is the Lorentzian fraction (fitted parameter), G is a Gaussian, and L is a Lorentzian with the same width parameter.
Parameters (in order): [amplitude, center, sigma, fraction]
Gaussian term: G = exp(−(x−c)²/(2σ²))
Lorentzian term: L = 1 / (1 + (x−c)²/σ²)
Jacobians are computed via the chain rule through G, L, and η.
Trait Implementations§
Source§impl Model for PseudoVoigt
impl Model for PseudoVoigt
Source§fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
Jacobian — one derivative per parameter, in the same order as
param_names(). Read moreSource§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 PseudoVoigt
impl RefUnwindSafe for PseudoVoigt
impl Send for PseudoVoigt
impl Sync for PseudoVoigt
impl Unpin for PseudoVoigt
impl UnsafeUnpin for PseudoVoigt
impl UnwindSafe for PseudoVoigt
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