#[non_exhaustive]pub enum PositiveSemidefiniteViolation {
#[non_exhaustive] NegativePivot {
value: f64,
},
#[non_exhaustive] ZeroPivotCoupling {
row: usize,
value: f64,
},
}Expand description
Computed LDLT condition that violates the no-pivot positive-semidefinite factorization requirements.
These values are computed in binary64. They explain why LDLT rejected the matrix, but do not prove that the stored matrix is exactly indefinite.
§Examples
use la_stack::prelude::*;
match LaError::not_positive_semidefinite_negative(1, -3.0) {
LaError::NotPositiveSemidefinite {
violation: PositiveSemidefiniteViolation::NegativePivot { value, .. },
..
} => assert_eq!(value, -3.0),
_ => unreachable!("constructor preserves the PSD violation"),
}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.
#[non_exhaustive]NegativePivot
LDLT produced a strictly negative diagonal pivot.
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.
#[non_exhaustive]ZeroPivotCoupling
A zero diagonal pivot still has a non-zero coupling below it.
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.
Trait Implementations§
Source§impl Clone for PositiveSemidefiniteViolation
impl Clone for PositiveSemidefiniteViolation
Source§fn clone(&self) -> PositiveSemidefiniteViolation
fn clone(&self) -> PositiveSemidefiniteViolation
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 PositiveSemidefiniteViolation
impl StructuralPartialEq for PositiveSemidefiniteViolation
Auto Trait Implementations§
impl Freeze for PositiveSemidefiniteViolation
impl RefUnwindSafe for PositiveSemidefiniteViolation
impl Send for PositiveSemidefiniteViolation
impl Sync for PositiveSemidefiniteViolation
impl Unpin for PositiveSemidefiniteViolation
impl UnsafeUnpin for PositiveSemidefiniteViolation
impl UnwindSafe for PositiveSemidefiniteViolation
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