pub struct ExtrapolatingInterpolator<I: Interpolate1D> { /* private fields */ }Expand description
A 1-D interpolant wrapped with configurable out-of-domain behaviour.
The same mode applies to both the lower (x < x_min) and upper
(x > x_max) boundaries. Use ExtrapolatingInterpolatorAsymmetric if
you need different modes per boundary.
Implementations§
Source§impl<I: Interpolate1D> ExtrapolatingInterpolator<I>
impl<I: Interpolate1D> ExtrapolatingInterpolator<I>
Sourcepub fn new(inner: I, x_min: f64, x_max: f64, mode: ExtrapolationMode) -> Self
pub fn new(inner: I, x_min: f64, x_max: f64, mode: ExtrapolationMode) -> Self
Create a new wrapped interpolant.
§Arguments
inner– The underlying interpolant.x_min– Lower bound of the valid domain.x_max– Upper bound of the valid domain (must be >x_min).mode– Extrapolation strategy.
Sourcepub fn eval(&self, x: f64) -> InterpolateResult<f64>
pub fn eval(&self, x: f64) -> InterpolateResult<f64>
Evaluate the (possibly extrapolated) interpolant at x.
Sourcepub fn mode(&self) -> &ExtrapolationMode
pub fn mode(&self) -> &ExtrapolationMode
Reference to the extrapolation mode.
Auto Trait Implementations§
impl<I> Freeze for ExtrapolatingInterpolator<I>where
I: Freeze,
impl<I> RefUnwindSafe for ExtrapolatingInterpolator<I>where
I: RefUnwindSafe,
impl<I> Send for ExtrapolatingInterpolator<I>where
I: Send,
impl<I> Sync for ExtrapolatingInterpolator<I>where
I: Sync,
impl<I> Unpin for ExtrapolatingInterpolator<I>where
I: Unpin,
impl<I> UnsafeUnpin for ExtrapolatingInterpolator<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for ExtrapolatingInterpolator<I>where
I: UnwindSafe,
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
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>
Converts
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>
Converts
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
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.