# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.algebra.linear.matrix.doubles.factorization.svd.mr3

## Class SVDbyMR3

• java.lang.Object
• com.numericalmethod.suanshu.algebra.linear.matrix.doubles.factorization.svd.mr3.SVDbyMR3
• All Implemented Interfaces:
SVDDecomposition

public class SVDbyMR3
extends Object
implements SVDDecomposition
Given a matrix A, computes its singular value decomposition (SVD), using "Algorithm of Multiple Relatively Robust Representations" (MRRR).
"Dhillon, Inderjit S. and Parlett, Beresford N., "Multiple representations to compute orthogonal eigenvectors of symmetric tridiagonal matrices", Linear Algebra and its Applications, 2004, 387, pp. 1-28."
• ### Constructor Summary

Constructors
Constructor and Description
SVDbyMR3(Matrix A, boolean doUV)
Creates a singular value decomposition for a matrix A.
• ### Method Summary

All Methods
Modifier and Type Method and Description
DiagonalMatrix D()
Get the D matrix as in SVD decomposition.
double[] getSingularValues()
Get the normalized, hence positive, singular values.
Matrix U()
Get the U matrix as in SVD decomposition.
Matrix Ut()
Get the transpose of U, i.e., U().t().
Matrix V()
Get the V matrix as in SVD decomposition.
Matrix Vt()
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### SVDbyMR3

public SVDbyMR3(Matrix A,
boolean doUV)
Creates a singular value decomposition for a matrix A.
Parameters:
A - the matrix A
doUV - true if singular vectors are required
• ### Method Detail

• #### D

public DiagonalMatrix D()
Description copied from interface: SVDDecomposition
Get the D matrix as in SVD decomposition.
Specified by:
D in interface SVDDecomposition
Returns:
D
• #### getSingularValues

public double[] getSingularValues()
Description copied from interface: SVDDecomposition
Get the normalized, hence positive, singular values. They may differ from the values in D if this computation turns off normalization.
Specified by:
getSingularValues in interface SVDDecomposition
Returns:
the singular values
• #### U

public Matrix U()
Description copied from interface: SVDDecomposition
Get the U matrix as in SVD decomposition.
Specified by:
U in interface SVDDecomposition
Returns:
U
• #### V

public Matrix V()
Description copied from interface: SVDDecomposition
Get the V matrix as in SVD decomposition.
Specified by:
V in interface SVDDecomposition
Returns:
V
• #### Vt

public Matrix Vt()
• #### Ut

public Matrix Ut()
Description copied from interface: SVDDecomposition
Get the transpose of U, i.e., U().t().
Specified by:
Ut in interface SVDDecomposition
Returns:
U().t()