org.ujmp.core.doublematrix.calculation.general.decomposition
Class SVD.SVDMatrix

java.lang.Object
  extended by org.ujmp.core.doublematrix.calculation.general.decomposition.SVD.SVDMatrix
Enclosing interface:
SVD<T>

public static final class SVD.SVDMatrix
extends Object


Constructor Summary
SVD.SVDMatrix(Matrix Arg)
          Construct the singular value decomposition
SVD.SVDMatrix(Matrix Arg, boolean thin, boolean wantu, boolean wantv)
          Construct the singular value decomposition
 
Method Summary
 double cond()
          Two norm condition number
 Matrix getreciprocalS()
          Return the diagonal matrix of the reciprocals of the singular values
 Matrix getS()
          Return the diagonal matrix of singular values
 double[] getSingularValues()
          Return the one-dimensional array of singular values
 Matrix getU()
          Return the left singular vectors
 Matrix getV()
          Return the right singular vectors
 Matrix inverse(boolean omit)
          Return the Moore-Penrose (generalized) inverse Slightly modified version of Kim van der Linde's code
 double norm2()
          Two norm
 int rank()
          Effective numerical matrix rank
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVD.SVDMatrix

public SVD.SVDMatrix(Matrix Arg)
Construct the singular value decomposition

Parameters:
Arg - Rectangular matrix

SVD.SVDMatrix

public SVD.SVDMatrix(Matrix Arg,
                     boolean thin,
                     boolean wantu,
                     boolean wantv)
Construct the singular value decomposition

Parameters:
Arg - Rectangular matrix
thin - If true U is economy sized
wantu - If true generate the U matrix
wantv - If true generate the V matrix
Method Detail

getU

public final Matrix getU()
Return the left singular vectors

Returns:
U

getV

public final Matrix getV()
Return the right singular vectors

Returns:
V

getSingularValues

public final double[] getSingularValues()
Return the one-dimensional array of singular values

Returns:
diagonal of S.

getS

public final Matrix getS()
Return the diagonal matrix of singular values

Returns:
S

getreciprocalS

public final Matrix getreciprocalS()
Return the diagonal matrix of the reciprocals of the singular values

Returns:
S+

inverse

public final Matrix inverse(boolean omit)
Return the Moore-Penrose (generalized) inverse Slightly modified version of Kim van der Linde's code

Parameters:
omit - if true tolerance based omitting of negligible singular values
Returns:
A+

norm2

public final double norm2()
Two norm

Returns:
max(S)

cond

public final double cond()
Two norm condition number

Returns:
max(S)/min(S)

rank

public final int rank()
Effective numerical matrix rank

Returns:
Number of nonnegligible singular values.


Copyright © 2010. All Rights Reserved.