pub struct Pearson7;Expand description
Pearson VII peak: A / [1 + ((x − c)/σ)² · (2^{1/m} − 1)]^m.
Parameters (in order): [amplitude, center, sigma, m]
amplitudeis the peak height attained atx == center.centeris the peak location.sigmais the half-width at half-maximum (the2^{1/m}−1factor normalizes soσis the HWHM for any shape exponent).mis the shape exponent:m → 1gives a Lorentzian,m → ∞a Gaussian.
The numpy benchmark oracle is identical —
A / (1 + ((x−c)/σ)² · (2**(1/m) − 1))**m — so numpy↔Rust parity is exact.
Trait Implementations§
Source§impl Model for Pearson7
impl Model for Pearson7
Source§fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
Central finite-difference Jacobian (the 2^{1/m} term makes the analytic
m-derivative awkward, so a numerical Jacobian is used, matching 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 Pearson7
impl RefUnwindSafe for Pearson7
impl Send for Pearson7
impl Sync for Pearson7
impl Unpin for Pearson7
impl UnsafeUnpin for Pearson7
impl UnwindSafe for Pearson7
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