pub enum SolverError {
NonConvergence {
iterations: usize,
residual: f64,
tolerance: f64,
},
NumericalInstability {
iteration: usize,
detail: String,
},
BudgetExhausted {
reason: String,
elapsed: Duration,
},
InvalidInput(ValidationError),
SpectralRadiusExceeded {
spectral_radius: f64,
limit: f64,
algorithm: Algorithm,
},
BackendError(String),
}Expand description
Primary error type for solver operations.
Variants§
NonConvergence
The iterative solver did not converge within the allowed iteration budget.
Fields
NumericalInstability
A numerical instability was detected (NaN, Inf, or loss of precision).
Fields
BudgetExhausted
The compute budget (wall-time, iterations, or memory) was exhausted.
Fields
InvalidInput(ValidationError)
The caller supplied invalid input (dimensions, parameters, etc.).
SpectralRadiusExceeded
The matrix spectral radius exceeds the threshold required by the algorithm.
Fields
BackendError(String)
A backend-specific error (e.g. nalgebra or BLAS).
Trait Implementations§
Source§impl Debug for SolverError
impl Debug for SolverError
Source§impl Display for SolverError
impl Display for SolverError
Source§impl Error for SolverError
impl Error for SolverError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ValidationError> for SolverError
impl From<ValidationError> for SolverError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SolverError
impl RefUnwindSafe for SolverError
impl Send for SolverError
impl Sync for SolverError
impl Unpin for SolverError
impl UnsafeUnpin for SolverError
impl UnwindSafe for SolverError
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