Class SVD

  • All Implemented Interfaces:
    SVDDecomposition

    public class SVD
    extends Object
    implements SVDDecomposition
    SVD decomposition decomposes a matrix A of dimension m x n, where m >= n, such that U' * A * V = D, or U * D * V' = A.
    • U is orthogonal and has the dimension m x n.
    • D is diagonal and has the dimension n x n.
    • V is orthogonal and has the dimension n x n.
    See Also:
    Wikipedia: Singular value decomposition
    • Field Detail

      • DEFAULT_METHOD

        public static final SVD.Method DEFAULT_METHOD
        The default algorithm for computing SVD.
    • Constructor Detail

      • SVD

        public SVD​(Matrix A,
                   boolean doUV)
        Runs the SVD decomposition on a matrix.
        Parameters:
        A - a matrix
        doUV - false if to compute only the singular values but not U and V
      • SVD

        public SVD​(Matrix A,
                   boolean doUV,
                   double epsilon)
        Runs the SVD decomposition on a matrix.
        Parameters:
        A - a matrix
        doUV - false if to compute only the singular values but not U and V
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
      • SVD

        public SVD​(Matrix A,
                   boolean doUV,
                   double epsilon,
                   SVD.Method method)
        Runs the SVD decomposition on a matrix.
        Parameters:
        A - a matrix
        doUV - false if to compute only the singular values but not U and V
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
        method - the algorithm for computing the decomposition