pub struct SplitGaussian;Expand description
Split (asymmetric) Gaussian: a Gaussian with a different width on each side of the center. Covers both “asymmetric split-σ Gaussian” and “bi-Gaussian”.
f(x) = A · exp(−(x−c)² / (2σ²)) with σ = σ_L for x < c, else σ_R.
Parameters (in order): [amplitude, center, sigma_l, sigma_r]
amplitudeis the peak height atx == center(both branches equalAthere, so the curve is continuous).centeris the peak location.sigma_l/sigma_rare the left/right Gaussian widths.
The numpy oracle is identical —
np.where(x < c, A·exp(−½((x−c)/σ_L)²), A·exp(−½((x−c)/σ_R)²)) — so parity is exact.
Trait Implementations§
Source§impl Model for SplitGaussian
impl Model for SplitGaussian
Source§fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
Central finite-difference Jacobian (the side-selecting branch makes the
analytic derivative piecewise; numerical is simpler and matches log_normal).
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 SplitGaussian
impl RefUnwindSafe for SplitGaussian
impl Send for SplitGaussian
impl Sync for SplitGaussian
impl Unpin for SplitGaussian
impl UnsafeUnpin for SplitGaussian
impl UnwindSafe for SplitGaussian
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