drasys.or.linear.algebra
Interface SVDecompositionI

All Known Implementing Classes:
QRIteration

public interface SVDecompositionI
extends DecompositionI

The interface used by all algorithms to access singular value decomposition algorithms.

See Also:

References:

Linear Algebra and Its Applications
    Gilbert Strang / Hardcover / Published 1988
Matrix Computations (Johns Hopkins Studies in the Mathematical Sciences)
    Gene H. Golub, Charles F. Van Loan (Contributor) / Paperback / Published 1996
Numerical Recipes in C : The Art of Scientific Computing
    William H. Press, et al / Hardcover / Published 1993
Parallel Algorithms for Matrix Computations
    K.A. Gallivan / Paperback / Published 1990


Method Summary
 double computeConditionNumber()
          Computes the condition number of the matrix.
 DenseMatrix computeInverse()
          Computes the inverse of the decomposed matrix from the components.
 MatrixI computeInverse(MatrixI results)
          Computes the inverse of the decomposed matrix from the components.
 void decompose(MatrixI matrix)
          Decompose matrix A into U, W and V matrices.
 DenseMatrix getU()
          Get the U matrix.
 MatrixI getU(MatrixI results)
          Get the U matrix.
 DenseMatrix getV()
          Get the V matrix.
 MatrixI getV(MatrixI results)
          Get the V matrix.
 SparseMatrix getW()
          Get the W matrix.
 MatrixI getW(MatrixI results)
          Get the W matrix.
 boolean isIllConditioned()
          Returns true if the decomposed matrix is ill-conditioned.
 boolean isSingular()
          Returns true if the decomposed matrix is singular.
 DenseVector solveEquations(VectorI rightHandSides)
          Uses backsubstitution to solve the simultaneous equations.
 VectorI solveEquations(VectorI rightHandSides, VectorI results)
          Uses backsubstitution to solve the simultaneous equations.
 

Method Detail

getU

public DenseMatrix getU()
Get the U matrix.
Returns:
null if no matrix has been decomposed.

getU

public MatrixI getU(MatrixI results)
Get the U matrix.
Returns:
null if no matrix has been decomposed.

getV

public DenseMatrix getV()
Get the V matrix.
Returns:
null if no matrix has been decomposed.

getV

public MatrixI getV(MatrixI results)
Get the V matrix.
Returns:
null if no matrix has been decomposed.

getW

public SparseMatrix getW()
Get the W matrix.
Returns:
null if no matrix has been decomposed.

getW

public MatrixI getW(MatrixI results)
Get the W matrix.
Returns:
null if no matrix has been decomposed.

decompose

public void decompose(MatrixI matrix)
               throws AlgebraException
Decompose matrix A into U, W and V matrices. Where: A[r][c] = U[r][c] * W[c][c] * transpose(V[c][c]) and W is a diagonal matrix of the singular values.
Specified by:
decompose in interface DecompositionI

solveEquations

public DenseVector solveEquations(VectorI rightHandSides)
                           throws AlgebraException
Uses backsubstitution to solve the simultaneous equations.
Specified by:
solveEquations in interface DecompositionI
Returns:
the results.
Throws:
AlgebraError - if no matrix has been decomposed

solveEquations

public VectorI solveEquations(VectorI rightHandSides,
                              VectorI results)
                       throws AlgebraException
Uses backsubstitution to solve the simultaneous equations.
Specified by:
solveEquations in interface DecompositionI
Returns:
the results.
Throws:
AlgebraError - if no matrix has been decomposed

computeInverse

public DenseMatrix computeInverse()
                           throws AlgebraException
Computes the inverse of the decomposed matrix from the components. Where: inverse(A) = V * diagonal(1/w[i][i]) * transpose(U).
Specified by:
computeInverse in interface DecompositionI
Returns:
the results.
Throws:
AlgebraError - if no matrix has been decomposed

computeInverse

public MatrixI computeInverse(MatrixI results)
                       throws AlgebraException
Computes the inverse of the decomposed matrix from the components. Where: inverse(A) = V * diagonal(1/w[i][i]) * transpose(U).
Specified by:
computeInverse in interface DecompositionI
Returns:
the results.
Throws:
AlgebraError - if no matrix has been decomposed

computeConditionNumber

public double computeConditionNumber()
Computes the condition number of the matrix. The condition number is a measure of the singularity of the matrix.
Returns:
NaN is the matrix is singular.
Throws:
AlgebraError - if no matrix has been decomposed

isIllConditioned

public boolean isIllConditioned()
Returns true if the decomposed matrix is ill-conditioned.
Throws:
AlgebraError - if no matrix has been decomposed

isSingular

public boolean isSingular()
Returns true if the decomposed matrix is singular.
Throws:
AlgebraError - if no matrix has been decomposed


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com