Interface DecompositionDoubleCalculations

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Matrix chol()
      Calculates a Cholesky decomposition of the matrix.
      Matrix[] eig()
      Calculates the Eigen decomposition of the matrix.
      Matrix[] eigSymm()
      Calculates the Eigen decomposition of a symmetric matrix.
      Matrix ginv()
      Calculates a generalized inverse of the Matrix
      Matrix inv()
      Calculates the inverse of the Matrix using either LUDecomposition (for square matrices) or QRDecomposition (otherwise).
      Matrix invSPD()
      Calculates the inverse of a symmetric positive definite Matrix using Cholesky Decomposition.
      Matrix invSymm()
      Calculates the inverse of the Matrix using either LUDecomposition (for square matrices) or QRDecomposition (otherwise).
      Matrix[] lu()
      Calculates a LU decomposition of the matrix.
      Matrix pinv()
      Calculates the pseudo inverse of the Matrix using Singular Value Decomposition.
      Matrix pinv​(int k)
      Calculates the pseudo inverse of the Matrix using a low rank approximation of the Singular Value Decomposition.
      Matrix princomp()
      Projects the matrix into the space of the principal components.
      Matrix[] qr()
      Calculates a QR decomposition of the matrix.
      Matrix solve​(Matrix b)
      Solve A*X = B
      Matrix solveSPD​(Matrix b)
      Solve A*X = B
      Matrix solveSymm​(Matrix b)
      Solve A*X = B
      Matrix[] svd()
      Calculates the singular value decomposition of the matrix: A = U*S*V'
      Matrix[] svd​(int k)
      Calculates a low rank approximation of the singular value decomposition of the matrix: A = U*S*V' but considers only the k largest singular values.
    • Method Detail

      • inv

        Matrix inv()
        Calculates the inverse of the Matrix using either LUDecomposition (for square matrices) or QRDecomposition (otherwise).
        Returns:
        Inverse of the matrix
      • invSymm

        Matrix invSymm()
        Calculates the inverse of the Matrix using either LUDecomposition (for square matrices) or QRDecomposition (otherwise).
        Returns:
        Inverse of the matrix
      • invSPD

        Matrix invSPD()
        Calculates the inverse of a symmetric positive definite Matrix using Cholesky Decomposition.
        Returns:
        Inverse of the matrix
      • solve

        Matrix solve​(Matrix b)
        Solve A*X = B
        Parameters:
        b - right hand side
        Returns:
        solution for X if A is square, least squares solution otherwise
      • solveSymm

        Matrix solveSymm​(Matrix b)
        Solve A*X = B
        Parameters:
        b - right hand side
        Returns:
        solution for X if A is square, least squares solution otherwise
      • solveSPD

        Matrix solveSPD​(Matrix b)
        Solve A*X = B
        Parameters:
        b - right hand side
        Returns:
        solution for X if A is square, least squares solution otherwise
      • pinv

        Matrix pinv()
        Calculates the pseudo inverse of the Matrix using Singular Value Decomposition.
        Returns:
        Pseudo inverse of the Matrix
      • pinv

        Matrix pinv​(int k)
        Calculates the pseudo inverse of the Matrix using a low rank approximation of the Singular Value Decomposition. Considers only the k largest singular values. This speeds up processing for large matrices.
        Parameters:
        k - number of singular values to consider
        Returns:
        Pseudo inverse of the Matrix
      • ginv

        Matrix ginv()
        Calculates a generalized inverse of the Matrix
        Returns:
        Pseudo inverse of the Matrix
      • princomp

        Matrix princomp()
        Projects the matrix into the space of the principal components.
        Returns:
        Matrix projected on principal components.
      • svd

        Matrix[] svd()
        Calculates the singular value decomposition of the matrix: A = U*S*V'
        Returns:
        Singular value decomposition of the matrix.
      • svd

        Matrix[] svd​(int k)
        Calculates a low rank approximation of the singular value decomposition of the matrix: A = U*S*V' but considers only the k largest singular values. This speeds up processing for large matrices.
        Parameters:
        k - number of singular values to consider
        Returns:
        Singular value decomposition of the matrix.
      • eig

        Matrix[] eig()
        Calculates the Eigen decomposition of the matrix.
        Returns:
        Eigen decomposition of the matrix.
      • eigSymm

        Matrix[] eigSymm()
        Calculates the Eigen decomposition of a symmetric matrix.
        Returns:
        Eigen decomposition of the matrix.
      • qr

        Matrix[] qr()
        Calculates a QR decomposition of the matrix.
        Returns:
        QR decomposition of the matrix.
      • lu

        Matrix[] lu()
        Calculates a LU decomposition of the matrix.
        Returns:
        LU decomposition of the matrix.
      • chol

        Matrix chol()
        Calculates a Cholesky decomposition of the matrix.
        Returns:
        Cholesky decomposition of the matrix.