pub enum InterpolationError {
Linear(String),
Bilinear(String),
Cubic(String),
Spline(String),
Position(PositionError),
Curve(CurveError),
Surface(SurfaceError),
EmptyData,
OutOfRange {
target: String,
},
DegenerateInterval,
}Expand description
Represents errors that can occur during different interpolation operations.
This enum encapsulates various types of errors that might be encountered when performing numerical interpolation across different methods. Each variant corresponds to a specific interpolation technique and contains a descriptive error message.
Interpolation errors typically arise from invalid input data, mathematical constraints, or numerical stability issues specific to each interpolation method.
Variants§
Linear(String)
Errors that occur during linear interpolation.
These may include insufficient data points, non-monotonic input values, or out-of-bounds interpolation attempts.
Bilinear(String)
Errors that occur during bilinear interpolation.
These may include a sample too small to build a cell from (fewer than
four points on a Curve), or a
checked-arithmetic step leaving the representable range.
A query in the last segments of a
Curve is not one of them. The cell there is
built by clamping its far edge to the curve’s last segment, which is
described on
BiLinearInterpolation for Curve;
it used to report this error because the cell ran off the end of the
sample.
Cubic(String)
Errors that occur during cubic interpolation.
These may include insufficient data points for cubic polynomial fitting, oscillation issues, or numerical instability.
Spline(String)
Errors that occur during spline interpolation.
These may include insufficient data points for spline construction, boundary condition issues, or knot placement problems.
Position(PositionError)
Error from position operations.
Curve(CurveError)
Error from curve operations.
Surface(SurfaceError)
Error from surface operations.
EmptyData
Input data set was empty so interpolation could not proceed.
OutOfRange
Requested point falls outside the valid interpolation range.
DegenerateInterval
Interval degenerated into a point (two consecutive knots coincide).
Trait Implementations§
Source§impl Debug for InterpolationError
impl Debug for InterpolationError
Source§impl Display for InterpolationError
impl Display for InterpolationError
Source§impl Error for InterpolationError
impl Error for InterpolationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CurveError> for InterpolationError
impl From<CurveError> for InterpolationError
Source§fn from(err: CurveError) -> Self
fn from(err: CurveError) -> Self
Source§impl From<InterpolationError> for CurveError
impl From<InterpolationError> for CurveError
Source§fn from(err: InterpolationError) -> Self
fn from(err: InterpolationError) -> Self
Source§impl From<InterpolationError> for SurfaceError
impl From<InterpolationError> for SurfaceError
Source§fn from(err: InterpolationError) -> Self
fn from(err: InterpolationError) -> Self
Source§impl From<PositionError> for InterpolationError
impl From<PositionError> for InterpolationError
Source§fn from(source: PositionError) -> Self
fn from(source: PositionError) -> Self
Source§impl From<SurfaceError> for InterpolationError
impl From<SurfaceError> for InterpolationError
Source§fn from(source: SurfaceError) -> Self
fn from(source: SurfaceError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for InterpolationError
impl !UnwindSafe for InterpolationError
impl Freeze for InterpolationError
impl Send for InterpolationError
impl Sync for InterpolationError
impl Unpin for InterpolationError
impl UnsafeUnpin for InterpolationError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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
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.