pub struct CauchyDispersion;Expand description
Cauchy refractive-index dispersion: n(x) = a + b/x² + c/x⁴.
Parameters (in order): [a, b, c]
ais the high-frequency (constant) refractive-index offset.bis the first dispersion coefficient (units of x²).cis the second dispersion coefficient (units of x⁴).
The independent variable x is a wavelength and must be > 0; the kernel is smooth
and analytic there. At x == 0 the 1/x² / 1/x⁴ terms are undefined, so the kernel
returns 0.0 (matching the numpy oracle np.where(x > 0, a + b/x² + c/x⁴, 0)), keeping
numpy↔Rust parity exact. The analytical Jacobian is [1, 1/x², 1/x⁴].
Trait Implementations§
Source§impl Model for CauchyDispersion
impl Model for CauchyDispersion
Source§fn jacobian(&self, x: &[f64], _params: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], _params: &[f64]) -> Vec<f64>
Analytical Jacobian: ∂n/∂a = 1, ∂n/∂b = 1/x², ∂n/∂c = 1/x⁴ (for x > 0);
all zero at x ≤ 0 where the kernel is clamped to 0.
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 CauchyDispersion
impl RefUnwindSafe for CauchyDispersion
impl Send for CauchyDispersion
impl Sync for CauchyDispersion
impl Unpin for CauchyDispersion
impl UnsafeUnpin for CauchyDispersion
impl UnwindSafe for CauchyDispersion
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