pub struct Kww;Expand description
Kohlrausch–Williams–Watts (KWW) stretched exponential: A · exp(−(x/τ)^β).
Parameters (in order): [amplitude, tau, beta]
amplitude(A) is the value atx == 0(where(0/τ)^β = 0⇒exp(0) = 1).tau(τ > 0) is the characteristic relaxation time.beta(0 < β ≤ 1) is the stretching exponent:β = 1recovers a plain exponential,β < 1gives a stretched (multi-timescale) relaxation.
Defined for x ≥ 0. For x < 0 the base x/τ is negative and a fractional β
would yield a NaN, so the kernel returns 0.0 there. The numpy benchmark formula is
identical — np.where(x >= 0, A·exp(−(x/τ)^β), 0) — so numpy↔Rust parity is exact.
Trait Implementations§
Source§impl Model for Kww
impl Model for Kww
Source§fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], params: &[f64]) -> Vec<f64>
Central finite-difference Jacobian. ∂/∂β involves ln(x/τ) which diverges as
x → 0⁺, 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 Kww
impl RefUnwindSafe for Kww
impl Send for Kww
impl Sync for Kww
impl Unpin for Kww
impl UnsafeUnpin for Kww
impl UnwindSafe for Kww
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