#[non_exhaustive]pub enum LinalgError {
NotSquare {
rows: usize,
cols: usize,
},
Shape(String),
Singular(usize),
NotPositiveDefinite(usize),
NoConvergence(&'static str),
NonFinite,
}Expand description
Why a decomposition or solve failed. Converts into the library-wide
ErrorsJSL with ?.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotSquare
The operation needs a square matrix but got rows × cols.
Shape(String)
Operand shapes do not fit together.
Singular(usize)
The matrix is singular (an exact or numerically zero pivot at this step).
NotPositiveDefinite(usize)
Cholesky found a non-positive pivot: the matrix is not positive definite.
NoConvergence(&'static str)
An iterative algorithm did not converge within its iteration budget.
NonFinite
The matrix contains NaN or infinity.
Trait Implementations§
Source§impl Clone for LinalgError
impl Clone for LinalgError
Source§impl Debug for LinalgError
impl Debug for LinalgError
Source§impl Display for LinalgError
impl Display for LinalgError
Source§impl Error for LinalgError
impl Error for LinalgError
1.30.0 · 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<LinalgError> for ErrorsJSL
impl From<LinalgError> for ErrorsJSL
Source§fn from(e: LinalgError) -> Self
fn from(e: LinalgError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LinalgError
impl PartialEq for LinalgError
impl StructuralPartialEq for LinalgError
Auto Trait Implementations§
impl Freeze for LinalgError
impl RefUnwindSafe for LinalgError
impl Send for LinalgError
impl Sync for LinalgError
impl Unpin for LinalgError
impl UnsafeUnpin for LinalgError
impl UnwindSafe for LinalgError
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