pub struct DSvd2 {
pub u: DMat2,
pub s: DVec2,
pub vt: DMat2,
}Expand description
The SVD of a 2x2 matrix (f64 precision).
Fields§
§u: DMat2The left orthogonal matrix U.
s: DVec2The singular values (diagonal entries of S).
vt: DMat2The transposed right orthogonal matrix V^T.
Implementations§
Source§impl DSvd2
impl DSvd2
Sourcepub fn from_matrix(m: DMat2) -> Self
pub fn from_matrix(m: DMat2) -> Self
Computes the SVD of a 2x2 matrix.
Returns the decomposition M = U * S * V^T where:
Uis an orthogonal matrixSis a diagonal matrix (stored as a vector of singular values)V^Tis the transpose of an orthogonal matrix
The singular values are sorted in descending order (s.x >= s.y).
Trait Implementations§
impl Copy for DSvd2
impl StructuralPartialEq for DSvd2
Auto Trait Implementations§
impl Freeze for DSvd2
impl RefUnwindSafe for DSvd2
impl Send for DSvd2
impl Sync for DSvd2
impl Unpin for DSvd2
impl UnwindSafe for DSvd2
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.