pub struct Mgh09Rational;Expand description
Kowalik–Osborne rational function (NIST StRD MGH09 model).
y = amplitude · (x² + num_lin · x) / (x² + den_lin · x + den_const)Parameters (in order): [amplitude, num_lin, den_lin, den_const]
Mapping from NIST MGH09 b-parameters:
amplitude= b1 (≈ 0.1928)num_lin= b2 (≈ 0.1913; coefficient of x in the numerator)den_lin= b3 (≈ 0.1231; coefficient of x in the denominator)den_const= b4 (≈ 0.1361; constant term in the denominator)
Domain guard: D = x² + den_lin·x + den_const must be non-zero.
The MGH09 certified parameters satisfy discriminant = den_lin² − 4·den_const < 0,
which means D > 0 for all x. If D = 0 (or becomes zero during LM search), the
function returns f64::NAN so the solver backs off.
Analytic Jacobian (let N = x² + num_lin·x, D = x² + den_lin·x + den_const):
- ∂y/∂amplitude = N/D
- ∂y/∂num_lin = amplitude · x / D
- ∂y/∂den_lin = −amplitude · N · x / D²
- ∂y/∂den_const = −amplitude · N / D²
Trait Implementations§
Source§impl Model for Mgh09Rational
impl Model for Mgh09Rational
Source§fn jacobian_into(&self, x: &[f64], p: &[f64], out: &mut [f64])
fn jacobian_into(&self, x: &[f64], p: &[f64], out: &mut [f64])
Fill a pre-allocated slice with Jacobian values (one entry per parameter). Read more
Source§fn jacobian(&self, x: &[f64], p: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], p: &[f64]) -> Vec<f64>
Jacobian — one derivative per parameter, in the same order as
param_names(). Read moreSource§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 Mgh09Rational
impl RefUnwindSafe for Mgh09Rational
impl Send for Mgh09Rational
impl Sync for Mgh09Rational
impl Unpin for Mgh09Rational
impl UnsafeUnpin for Mgh09Rational
impl UnwindSafe for Mgh09Rational
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