pub struct LinearCurve { /* private fields */ }Expand description
Piecewise-linear interpolation between anchor points. Extrapolates flat outside the observed range.
O(log n) evaluation via binary search.
Implementations§
Source§impl LinearCurve
impl LinearCurve
Trait Implementations§
Source§impl Clone for LinearCurve
impl Clone for LinearCurve
Source§fn clone(&self) -> LinearCurve
fn clone(&self) -> LinearCurve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearCurve
impl Debug for LinearCurve
Source§impl YieldCurveInterpolator for LinearCurve
impl YieldCurveInterpolator for LinearCurve
Source§fn rate_at(&self, t_years: f64) -> f64
fn rate_at(&self, t_years: f64) -> f64
Interpolated rate at
t_years. Returns the boundary rate if t_years
falls outside the observed range.Source§fn method_name(&self) -> &'static str
fn method_name(&self) -> &'static str
Stable identifier for the method (e.g.
"linear", "cubic_spline",
"nelson_siegel", "svensson"). Useful for tagging response payloads.Source§fn observed_range(&self) -> (f64, f64)
fn observed_range(&self) -> (f64, f64)
The
(min, max) t_years range observed in the fitted data. Callers
can use this to mark whether a requested vertex is an interpolation
or an extrapolation.Auto Trait Implementations§
impl Freeze for LinearCurve
impl RefUnwindSafe for LinearCurve
impl Send for LinearCurve
impl Sync for LinearCurve
impl Unpin for LinearCurve
impl UnsafeUnpin for LinearCurve
impl UnwindSafe for LinearCurve
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