Struct la::SVD [] [src]

pub struct SVD<T> {
    // some fields omitted
}

Singular Value Decomposition.

Ported from JAMA (with changes).

For an m-by-n matrix A, the singular value decomposition is an m-by-m orthogonal matrix U, an m-by-n block diagonal matrix S, and an n-by-n orthogonal matrix V so that A = U*S*V'.

The singular values, sigma[k] = S[k][k], are ordered so that sigma[0] >= sigma[1] >= ... >= sigma[n-1].

The singular value decompostion always exists. The matrix condition number and the effective numerical rank can be computed from this decomposition.

Methods

impl<T: Float + Signed + ApproxEq<T>> SVD<T>

fn new(a: &Matrix<T>) -> SVD<T>

Calculates SVD.

fn get_u<'lt>(&'lt self) -> &'lt Matrix<T>

fn get_s<'lt>(&'lt self) -> &'lt Matrix<T>

fn get_v<'lt>(&'lt self) -> &'lt Matrix<T>

fn rank(&self) -> usize

fn direct(a: &Matrix<T>) -> SVD<T>

Calculates SVD using the direct method. Note that calculating it this way is not numerically stable, so it is mostly useful for testing purposes.