#[non_exhaustive]pub enum SingularityReason {
Exact,
#[non_exhaustive] Numerical {
factorization: FactorizationKind,
pivot_magnitude: f64,
tolerance: f64,
},
}Expand description
Mathematical or numerical reason a matrix was classified as singular.
§Examples
use la_stack::prelude::*;
match LaError::singular_numerical(1, FactorizationKind::Lu, 0.0, 1e-12) {
LaError::Singular {
reason: SingularityReason::Numerical { factorization, .. }, ..
} => assert_eq!(factorization, FactorizationKind::Lu),
_ => unreachable!("constructor preserves the singularity reason"),
}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.
Exact
The algorithm proved that the pivot is exactly zero.
#[non_exhaustive]Numerical
A finite pivot was rejected by the factorization tolerance.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
factorization: FactorizationKindFactorization applying the tolerance policy.
Trait Implementations§
Source§impl Clone for SingularityReason
impl Clone for SingularityReason
Source§fn clone(&self) -> SingularityReason
fn clone(&self) -> SingularityReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SingularityReason
Source§impl Debug for SingularityReason
impl Debug for SingularityReason
Source§impl PartialEq for SingularityReason
impl PartialEq for SingularityReason
impl StructuralPartialEq for SingularityReason
Auto Trait Implementations§
impl Freeze for SingularityReason
impl RefUnwindSafe for SingularityReason
impl Send for SingularityReason
impl Sync for SingularityReason
impl Unpin for SingularityReason
impl UnsafeUnpin for SingularityReason
impl UnwindSafe for SingularityReason
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