Struct nalgebra_lapack::SVD
source · pub struct SVD<T: Scalar, R: DimMin<C>, C: Dim>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,{
pub u: OMatrix<T, R, R>,
pub vt: OMatrix<T, C, C>,
pub singular_values: OVector<T, DimMinimum<R, C>>,
}
Expand description
The SVD decomposition of a general matrix.
Fields§
§u: OMatrix<T, R, R>
The left-singular vectors U
of this SVD.
vt: OMatrix<T, C, C>
The right-singular vectors V^t
of this SVD.
singular_values: OVector<T, DimMinimum<R, C>>
The singular values of this SVD.
Implementations§
source§impl<T: SVDScalar<R, C>, R: DimMin<C>, C: Dim> SVD<T, R, C>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, R, C> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,
impl<T: SVDScalar<R, C>, R: DimMin<C>, C: Dim> SVD<T, R, C>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, R, C> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,
source§impl<R: DimMin<C>, C: Dim> SVD<f32, R, C>where
DefaultAllocator: Allocator<f32, R, C> + Allocator<f32, C, R> + Allocator<f32, U1, R> + Allocator<f32, U1, C> + Allocator<f32, R, R> + Allocator<f32, DimMinimum<R, C>> + Allocator<f32, DimMinimum<R, C>, R> + Allocator<f32, DimMinimum<R, C>, C> + Allocator<f32, R, DimMinimum<R, C>> + Allocator<f32, C, C>,
impl<R: DimMin<C>, C: Dim> SVD<f32, R, C>where
DefaultAllocator: Allocator<f32, R, C> + Allocator<f32, C, R> + Allocator<f32, U1, R> + Allocator<f32, U1, C> + Allocator<f32, R, R> + Allocator<f32, DimMinimum<R, C>> + Allocator<f32, DimMinimum<R, C>, R> + Allocator<f32, DimMinimum<R, C>, C> + Allocator<f32, R, DimMinimum<R, C>> + Allocator<f32, C, C>,
sourcepub fn recompose(self) -> OMatrix<f32, R, C>
pub fn recompose(self) -> OMatrix<f32, R, C>
Reconstructs the matrix from its decomposition.
Useful if some components (e.g. some singular values) of this decomposition have been manually changed by the user.
sourcepub fn pseudo_inverse(&self, epsilon: f32) -> OMatrix<f32, C, R>
pub fn pseudo_inverse(&self, epsilon: f32) -> OMatrix<f32, C, R>
Computes the pseudo-inverse of the decomposed matrix.
All singular value below epsilon will be set to zero instead of being inverted.
source§impl<R: DimMin<C>, C: Dim> SVD<f64, R, C>where
DefaultAllocator: Allocator<f64, R, C> + Allocator<f64, C, R> + Allocator<f64, U1, R> + Allocator<f64, U1, C> + Allocator<f64, R, R> + Allocator<f64, DimMinimum<R, C>> + Allocator<f64, DimMinimum<R, C>, R> + Allocator<f64, DimMinimum<R, C>, C> + Allocator<f64, R, DimMinimum<R, C>> + Allocator<f64, C, C>,
impl<R: DimMin<C>, C: Dim> SVD<f64, R, C>where
DefaultAllocator: Allocator<f64, R, C> + Allocator<f64, C, R> + Allocator<f64, U1, R> + Allocator<f64, U1, C> + Allocator<f64, R, R> + Allocator<f64, DimMinimum<R, C>> + Allocator<f64, DimMinimum<R, C>, R> + Allocator<f64, DimMinimum<R, C>, C> + Allocator<f64, R, DimMinimum<R, C>> + Allocator<f64, C, C>,
sourcepub fn recompose(self) -> OMatrix<f64, R, C>
pub fn recompose(self) -> OMatrix<f64, R, C>
Reconstructs the matrix from its decomposition.
Useful if some components (e.g. some singular values) of this decomposition have been manually changed by the user.
sourcepub fn pseudo_inverse(&self, epsilon: f64) -> OMatrix<f64, C, R>
pub fn pseudo_inverse(&self, epsilon: f64) -> OMatrix<f64, C, R>
Computes the pseudo-inverse of the decomposed matrix.
All singular value below epsilon will be set to zero instead of being inverted.
Trait Implementations§
source§impl<T: Clone + Scalar, R: Clone + DimMin<C>, C: Clone + Dim> Clone for SVD<T, R, C>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,
impl<T: Clone + Scalar, R: Clone + DimMin<C>, C: Clone + Dim> Clone for SVD<T, R, C>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,
source§impl<T: Debug + Scalar, R: Debug + DimMin<C>, C: Debug + Dim> Debug for SVD<T, R, C>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,
impl<T: Debug + Scalar, R: Debug + DimMin<C>, C: Debug + Dim> Debug for SVD<T, R, C>where
DefaultAllocator: Allocator<T, R, R> + Allocator<T, DimMinimum<R, C>> + Allocator<T, C, C>,
impl<T: Scalar + Copy, R: DimMin<C>, C: Dim> Copy for SVD<T, R, C>where
DefaultAllocator: Allocator<T, C, C> + Allocator<T, R, R> + Allocator<T, DimMinimum<R, C>>,
OMatrix<T, R, R>: Copy,
OMatrix<T, C, C>: Copy,
OVector<T, DimMinimum<R, C>>: Copy,
Auto Trait Implementations§
impl<T, R, C> !RefUnwindSafe for SVD<T, R, C>
impl<T, R, C> !Send for SVD<T, R, C>
impl<T, R, C> !Sync for SVD<T, R, C>
impl<T, R, C> !Unpin for SVD<T, R, C>
impl<T, R, C> !UnwindSafe for SVD<T, R, C>
Blanket Implementations§
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.