[][src]Struct nalgebra_lapack::SVD

pub struct SVD<N: Scalar, R: DimMin<C>, C: Dim> where
    DefaultAllocator: Allocator<N, R, R> + Allocator<N, DimMinimum<R, C>> + Allocator<N, C, C>, 
{ pub u: MatrixN<N, R>, pub vt: MatrixN<N, C>, pub singular_values: VectorN<N, DimMinimum<R, C>>, }

The SVD decomposition of a general matrix.

Fields

u: MatrixN<N, R>

The left-singular vectors U of this SVD.

vt: MatrixN<N, C>

The right-singular vectors V^t of this SVD.

singular_values: VectorN<N, DimMinimum<R, C>>

The singular values of this SVD.

Methods

impl<N: SVDScalar<R, C>, R: DimMin<C>, C: Dim> SVD<N, R, C> where
    DefaultAllocator: Allocator<N, R, R> + Allocator<N, R, C> + Allocator<N, DimMinimum<R, C>> + Allocator<N, C, C>, 
[src]

pub fn new(m: MatrixMN<N, R, C>) -> Option<Self>[src]

Computes the Singular Value Decomposition of matrix.

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>, 
[src]

pub fn recompose(self) -> MatrixMN<f32, R, C>[src]

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.

pub fn pseudo_inverse(&self, epsilon: f32) -> MatrixMN<f32, C, R>[src]

Computes the pseudo-inverse of the decomposed matrix.

All singular value below epsilon will be set to zero instead of being inverted.

pub fn rank(&self, epsilon: f32) -> usize[src]

The rank of the decomposed matrix.

This is the number of singular values that are not too small (i.e. greater than the given epsilon).

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>, 
[src]

pub fn recompose(self) -> MatrixMN<f64, R, C>[src]

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.

pub fn pseudo_inverse(&self, epsilon: f64) -> MatrixMN<f64, C, R>[src]

Computes the pseudo-inverse of the decomposed matrix.

All singular value below epsilon will be set to zero instead of being inverted.

pub fn rank(&self, epsilon: f64) -> usize[src]

The rank of the decomposed matrix.

This is the number of singular values that are not too small (i.e. greater than the given epsilon).

Trait Implementations

impl<N: Scalar, R: DimMin<C>, C: Dim> Copy for SVD<N, R, C> where
    DefaultAllocator: Allocator<N, C, C> + Allocator<N, R, R> + Allocator<N, DimMinimum<R, C>>,
    MatrixMN<N, R, R>: Copy,
    MatrixMN<N, C, C>: Copy,
    VectorN<N, DimMinimum<R, C>>: Copy
[src]

impl<N: Clone + Scalar, R: Clone + DimMin<C>, C: Clone + Dim> Clone for SVD<N, R, C> where
    DefaultAllocator: Allocator<N, R, R> + Allocator<N, DimMinimum<R, C>> + Allocator<N, C, C>, 
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Debug + Scalar, R: Debug + DimMin<C>, C: Debug + Dim> Debug for SVD<N, R, C> where
    DefaultAllocator: Allocator<N, R, R> + Allocator<N, DimMinimum<R, C>> + Allocator<N, C, C>, 
[src]

Auto Trait Implementations

impl<N, R, C> !Send for SVD<N, R, C>

impl<N, R, C> !Sync for SVD<N, R, C>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self