pub enum ExtrapolationPolicy {
Boundary,
Exception,
Fill(f64),
Periodic,
}Expand description
Extrapolation policy controlling behavior when a query point falls
outside the domain of argvals.
Used with fdata_interpolate_with_policy to give callers explicit control
over out-of-range query handling instead of the silent boundary clamp that
fdata_interpolate applies.
Variants§
Boundary
Clamp the query point to the nearest boundary value.
A query at t < t_min returns the interpolated value at t_min;
a query at t > t_max returns the interpolated value at t_max.
Exception
Return an error for any out-of-range query point.
Returns Err(FdarError::InvalidParameter { parameter: "new_argvals", .. })
when a query point lies outside [argvals[0], argvals[m-1]].
Fill(f64)
Fill out-of-range cells with a constant value.
Periodic
Wrap query points modulo the domain length (periodic extension).
A query at t_min - delta returns the same value as t_max - delta.
Uses the guarded-modulo recipe ((t - t_min) % L + L) % L to handle
negative remainders for t < t_min.
Trait Implementations§
Source§impl Clone for ExtrapolationPolicy
impl Clone for ExtrapolationPolicy
Source§fn clone(&self) -> ExtrapolationPolicy
fn clone(&self) -> ExtrapolationPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExtrapolationPolicy
impl Debug for ExtrapolationPolicy
Source§impl PartialEq for ExtrapolationPolicy
impl PartialEq for ExtrapolationPolicy
impl StructuralPartialEq for ExtrapolationPolicy
Auto Trait Implementations§
impl Freeze for ExtrapolationPolicy
impl RefUnwindSafe for ExtrapolationPolicy
impl Send for ExtrapolationPolicy
impl Sync for ExtrapolationPolicy
impl Unpin for ExtrapolationPolicy
impl UnsafeUnpin for ExtrapolationPolicy
impl UnwindSafe for ExtrapolationPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.