pub enum InterpolateError {
Show 24 variants
InvalidInput {
message: String,
},
OutOfDomain {
point: String,
min: String,
max: String,
context: String,
},
InvalidParameter {
parameter: String,
expected: String,
actual: String,
context: String,
},
ShapeMismatch {
expected: String,
actual: String,
object: String,
},
ComputationError(String),
ShapeError(String),
NotImplemented(String),
InvalidValue(String),
DimensionMismatch(String),
OutOfBounds(String),
InvalidState(String),
InvalidOperation(String),
MappedPoint(f64),
MappedPointGeneric(Box<dyn Any + Send + Sync>),
IndexError(String),
IoError(String),
LinalgError(String),
NumericalError(String),
UnsupportedOperation(String),
InsufficientData(String),
InterpolationFailed(String),
MissingPoints,
MissingValues,
NumericalInstability {
message: String,
},
}Expand description
Interpolation error type with specific context
Variants§
InvalidInput
Invalid input data with specific details
OutOfDomain
Domain error with specific point and bounds
InvalidParameter
Invalid parameter value with expected range
ShapeMismatch
Shape mismatch with specific details
ComputationError(String)
Computation error (generic error)
ShapeError(String)
Shape error (ndarray shape mismatch)
NotImplemented(String)
Not implemented error
InvalidValue(String)
Invalid value provided
DimensionMismatch(String)
Dimension mismatch between arrays
OutOfBounds(String)
Point is outside the interpolation range
InvalidState(String)
Invalid interpolator state
InvalidOperation(String)
Invalid operation attempted
MappedPoint(f64)
Special case for boundary handling: point was mapped to an equivalent point This is a special case that’s not really an error, but used for control flow
MappedPointGeneric(Box<dyn Any + Send + Sync>)
Generic version of MappedPoint that can handle any numeric type Used for control flow in generic interpolation functions
IndexError(String)
Index out of bounds error
IoError(String)
I/O error
LinalgError(String)
Linear algebra error
NumericalError(String)
Numerical error (e.g., division by zero, overflow)
UnsupportedOperation(String)
Operation is not supported
InsufficientData(String)
Insufficient data for the operation
InterpolationFailed(String)
Interpolation failed
MissingPoints
Missing points data
MissingValues
Missing values data
NumericalInstability
Numerical instability detected
Implementations§
Source§impl InterpolateError
impl InterpolateError
Sourcepub fn invalid_input(message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
Create an InvalidInput error with a descriptive message
Sourcepub fn out_of_domain<T: Display>(
point: T,
min: T,
max: T,
context: impl Into<String>,
) -> Self
pub fn out_of_domain<T: Display>( point: T, min: T, max: T, context: impl Into<String>, ) -> Self
Create an OutOfDomain error with specific context
Sourcepub fn invalid_parameter<T: Display>(
parameter: impl Into<String>,
expected: impl Into<String>,
actual: T,
context: impl Into<String>,
) -> Self
pub fn invalid_parameter<T: Display>( parameter: impl Into<String>, expected: impl Into<String>, actual: T, context: impl Into<String>, ) -> Self
Create an InvalidParameter error with specific context
Sourcepub fn shape_mismatch(
expected: impl Into<String>,
actual: impl Into<String>,
object: impl Into<String>,
) -> Self
pub fn shape_mismatch( expected: impl Into<String>, actual: impl Into<String>, object: impl Into<String>, ) -> Self
Create a ShapeMismatch error with specific details
Sourcepub fn dimension_mismatch(expected: usize, actual: usize, context: &str) -> Self
pub fn dimension_mismatch(expected: usize, actual: usize, context: &str) -> Self
Create a standard dimension mismatch error
Sourcepub fn empty_data(context: &str) -> Self
pub fn empty_data(context: &str) -> Self
Create a standard empty data error
Sourcepub fn convergence_failure(method: &str, iterations: usize) -> Self
pub fn convergence_failure(method: &str, iterations: usize) -> Self
Create a standard convergence failure error
Sourcepub fn numerical_instability(context: &str, details: &str) -> Self
pub fn numerical_instability(context: &str, details: &str) -> Self
Create a numerical stability error
Sourcepub fn numerical_error(message: impl Into<String>) -> Self
pub fn numerical_error(message: impl Into<String>) -> Self
Create a numerical error
Sourcepub fn insufficient_points(
required: usize,
provided: usize,
method: &str,
) -> Self
pub fn insufficient_points( required: usize, provided: usize, method: &str, ) -> Self
Create an insufficient data points error
Sourcepub fn invalid_parameter_with_suggestion<T: Display>(
parameter: impl Into<String>,
value: T,
context: impl Into<String>,
suggestion: impl Into<String>,
) -> Self
pub fn invalid_parameter_with_suggestion<T: Display>( parameter: impl Into<String>, value: T, context: impl Into<String>, suggestion: impl Into<String>, ) -> Self
Create an actionable parameter error with suggestions
Sourcepub fn out_of_domain_with_suggestion<T: Display>(
point: T,
min: T,
max: T,
context: impl Into<String>,
suggestion: impl Into<String>,
) -> Self
pub fn out_of_domain_with_suggestion<T: Display>( point: T, min: T, max: T, context: impl Into<String>, suggestion: impl Into<String>, ) -> Self
Create an actionable domain error with recovery suggestions
Sourcepub fn numerical_instability_with_advice(
context: &str,
details: &str,
advice: &str,
) -> Self
pub fn numerical_instability_with_advice( context: &str, details: &str, advice: &str, ) -> Self
Create a numerical stability error with actionable advice
Sourcepub fn convergence_failure_with_advice(
method: &str,
iterations: usize,
advice: &str,
) -> Self
pub fn convergence_failure_with_advice( method: &str, iterations: usize, advice: &str, ) -> Self
Create a convergence failure with actionable recommendations
Sourcepub fn matrix_conditioning_error(
condition_number: f64,
context: &str,
recommended_regularization: Option<f64>,
) -> Self
pub fn matrix_conditioning_error( condition_number: f64, context: &str, recommended_regularization: Option<f64>, ) -> Self
Create a matrix conditioning error with specific recommendations
Sourcepub fn data_quality_error(
issue: &str,
context: &str,
preprocessingadvice: &str,
) -> Self
pub fn data_quality_error( issue: &str, context: &str, preprocessingadvice: &str, ) -> Self
Create a data quality error with preprocessing suggestions
Sourcepub fn method_selection_error(
attempted_method: &str,
data_characteristics: &str,
recommended_alternatives: &[&str],
) -> Self
pub fn method_selection_error( attempted_method: &str, data_characteristics: &str, recommended_alternatives: &[&str], ) -> Self
Create a method selection error with alternative suggestions
Sourcepub fn performance_warning(
operation: &str,
data_size: usize,
optimization_advice: &str,
) -> Self
pub fn performance_warning( operation: &str, data_size: usize, optimization_advice: &str, ) -> Self
Create a performance warning with optimization suggestions
Trait Implementations§
Source§impl Debug for InterpolateError
impl Debug for InterpolateError
Source§impl Display for InterpolateError
impl Display for InterpolateError
Source§impl Error for InterpolateError
impl Error for InterpolateError
1.30.0 · 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
Source§impl From<CoreError> for InterpolateError
impl From<CoreError> for InterpolateError
Source§impl From<ShapeError> for InterpolateError
impl From<ShapeError> for InterpolateError
Source§fn from(err: ShapeError) -> Self
fn from(err: ShapeError) -> Self
Auto Trait Implementations§
impl Freeze for InterpolateError
impl !RefUnwindSafe for InterpolateError
impl Send for InterpolateError
impl Sync for InterpolateError
impl Unpin for InterpolateError
impl !UnwindSafe for InterpolateError
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> 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.