#[non_exhaustive]pub enum StatlaError {
Dimension {
what: &'static str,
expected: usize,
found: usize,
},
InvalidArgument {
what: &'static str,
},
NonFinite {
what: &'static str,
index: usize,
},
NotPositiveDefinite {
column: usize,
},
DowndateIndefinite {
margin: f64,
},
RankDeficient {
column: usize,
},
NoConvergence {
requested: usize,
converged: usize,
restarts: usize,
},
Operator(OperatorError),
Lu(LuError),
Kkt(KktError),
}Expand description
Everything that can go wrong, for every function of the crate (decision S10: one error type). No function of the crate panics on bad input; panics are bugs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dimension
Two lengths that must agree do not.
Fields
InvalidArgument
An argument outside its domain: an index out of range, a view whose
ld < rows, a matrix that is not square, an option out of its
range, …
NonFinite
A NaN or an infinity in the input.
NotPositiveDefinite
Cholesky factorization met a nonpositive pivot at column (the
matrix is not positive definite within CholOptions::pivot_tol).
DowndateIndefinite
A downdate A − x xᵀ would not be positive definite: with Rᵀa = x, 1 − ‖a‖² ≤ CholOptions::downdate_tol (step C2 of 12.2). The
factor is unchanged (H3).
RankDeficient
Qr met a column (or, in delete_row, a complement vector) whose
norm fell below QrOptions::rank_tol after reorthogonalization.
Fields
NoConvergence
Fewer than requested values converged within the restart limit
(and allow_partial of the options is off).
Fields
Operator(OperatorError)
The caller’s operator reported an error.
Lu(LuError)
The LU of A − σI failed (shift-invert, crate::ShiftInvert); σ
is probably an eigenvalue.
Kkt(KktError)
The LDLᵀ of A − σI failed (crate::SymShiftInvert); a
KktError::WrongInertia with zero pivots means σ is
(numerically) an eigenvalue.
Trait Implementations§
Source§impl Clone for StatlaError
impl Clone for StatlaError
Source§impl Debug for StatlaError
impl Debug for StatlaError
Source§impl Display for StatlaError
impl Display for StatlaError
Source§impl Error for StatlaError
impl Error for StatlaError
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
use the Display impl or to_string()