Interface Eigenvalue<N extends java.lang.Comparable<N>>

    • Method Detail

      • copyEigenvector

        private void copyEigenvector​(int index,
                                     Array1D<ComplexNumber> destination)
      • getD

        MatrixStore<N> getD()
        The only requirements on [D] are that it should contain the eigenvalues and that [A][V] = [V][D]. The ordering of the eigenvalues is not specified.
        • If [A] is real and symmetric then [D] is (purely) diagonal with real eigenvalues.
        • If [A] is real but not symmetric then [D] is block-diagonal with real eigenvalues in 1-by-1 blocks and complex eigenvalues in 2-by-2 blocks.
        • If [A] is complex then [D] is (purely) diagonal with complex eigenvalues.
        Returns:
        The (block) diagonal eigenvalue matrix.
      • getEigenvalues

        Array1D<ComplexNumber> getEigenvalues()

        Even for real matrices the eigenvalues (and eigenvectors) are potentially complex numbers. Typically they need to be expressed as complex numbers when [A] is not symmetric.

        The values should be in the same order as the matrices "V" and "D", and if they is ordered or not is indicated by the isOrdered() method.

        Returns:
        The eigenvalues.
      • getEigenvalues

        default void getEigenvalues​(double[] realParts,
                                    java.util.Optional<double[]> imaginaryParts)
        Parameters:
        realParts - An array that will receive the real parts of the eigenvalues
        imaginaryParts - An optional array that, if present, will receive the imaginary parts of the eigenvalues
      • getTrace

        ComplexNumber getTrace()
        A matrix' trace is the sum of the diagonal elements. It is also the sum of the eigenvalues. This method should return the sum of the eigenvalues.
        Returns:
        The matrix' trace
      • getV

        MatrixStore<N> getV()
        The columns of [V] represent the eigenvectors of [A] in the sense that [A][V] = [V][D].
        Returns:
        The eigenvector matrix.
      • isHermitian

        boolean isHermitian()
        If [A] is hermitian then [V][D][V]-1 becomes [Q][D][Q]H...
      • isOrdered

        boolean isOrdered()
        The eigenvalues in D (and the eigenvectors in V) are not necessarily ordered. This is a property of the algorithm/implementation, not the data.
        Specified by:
        isOrdered in interface MatrixDecomposition.Ordered<N extends java.lang.Comparable<N>>
        Returns:
        true if they are ordered