pub enum SparseError {
DimensionMismatch {
expected: (usize, usize),
got: (usize, usize),
context: String,
},
NotSquare {
dims: (usize, usize),
},
InvalidInput {
reason: String,
},
StructurallySingular {
column: usize,
},
NumericalSingularity {
pivot_index: usize,
value: f64,
},
AnalysisFailure {
reason: String,
},
IoError {
source: String,
path: String,
},
ParseError {
reason: String,
path: String,
line: Option<usize>,
},
MatrixNotFound {
name: String,
},
SolveBeforeFactor {
context: String,
},
}Expand description
Errors that can occur during sparse solver operations.
Note: PartialEq is intentionally not derived because the NumericalSingularity
variant contains f64, where NaN != NaN would cause subtle comparison bugs.
Use matches!() for pattern-matching assertions in tests.
Variants§
DimensionMismatch
Matrix dimensions are incompatible.
Fields
NotSquare
A matrix that should be square is not.
InvalidInput
Input contains NaN, Inf, or other invalid floating-point values.
StructurallySingular
The matrix is structurally singular (symbolic analysis detected zero diagonal).
NumericalSingularity
Numeric factorization encountered a zero or near-zero pivot.
AnalysisFailure
An ordering or analysis algorithm failed.
IoError
An IO operation failed (file not found, permission denied, etc.).
ParseError
A file could not be parsed (malformed Matrix Market, invalid JSON, etc.).
Fields
MatrixNotFound
A named matrix was not found in the registry.
SolveBeforeFactor
Solve was called before factor() completed.
Trait Implementations§
Source§impl Clone for SparseError
impl Clone for SparseError
Source§fn clone(&self) -> SparseError
fn clone(&self) -> SparseError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SparseError
impl Debug for SparseError
Source§impl Display for SparseError
impl Display for SparseError
Source§impl Error for SparseError
impl Error for SparseError
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
Auto Trait Implementations§
impl Freeze for SparseError
impl RefUnwindSafe for SparseError
impl Send for SparseError
impl Sync for SparseError
impl Unpin for SparseError
impl UnsafeUnpin for SparseError
impl UnwindSafe for SparseError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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 more