Class EigenDecomposition


  • public class EigenDecomposition
    extends Object
    Let A be a square, diagonalizable N × N matrix with N linearly independent eigenvectors. Then A can be factorized as Q * D * Q' = A. Q is the square N × N matrix whose i-th column is the eigenvector of A, and D is the diagonal matrix whose diagonal elements are the corresponding eigenvalues.
    See Also:
    Wikipedia: Eigendecomposition of a matrix
    • Constructor Detail

      • EigenDecomposition

        public EigenDecomposition​(Matrix A)
        Runs the eigen decomposition on a square matrix.
        Parameters:
        A - a square, diagonalizable matrix
      • EigenDecomposition

        public EigenDecomposition​(Matrix A,
                                  double epsilon)
        Runs the eigen decomposition on a square matrix.
        Parameters:
        A - a square, diagonalizable matrix
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
    • Method Detail

      • D

        public DiagonalMatrix D()
        Get the diagonal matrix D as in Q * D * Q' = A.

        Note that for the moment we support only real eigenvalues.

        Returns:
        D
      • Q

        public Matrix Q()
        Get Q as in Q * D * Q' = A.

        Note that for the moment we support only real eigenvalues.

        Returns:
        Q
      • Qt

        public Matrix Qt()
        Get Q' as in Q * D * Q' = A.

        Note that for the moment we support only real eigenvalues.

        Returns:
        Q.t()