org.ojalgo.matrix.decomposition
Interface Eigenvalue<N extends Number>

All Superinterfaces:
MatrixDecomposition<N>
All Known Implementing Classes:
EigenvalueDecomposition, JamaEigenvalue, JamaEigenvalue.General, JamaEigenvalue.Nonsymmetric, JamaEigenvalue.Symmetric

public interface Eigenvalue<N extends Number>
extends MatrixDecomposition<N>

Calculates eigenvalues and eigenvectors (for square matrices).

For any square matrix [A] there are matrices [D] and [V] so that [A][V] = [V][D] where [D] contains the eigenvalues on the diagonal (possibly in blocks) and [V] has the eigenvectors as columns.

Note that it is not always possible to calculate [A] = [V][D][V]-1 due to [V] being badly conditioned, or even singular.

If [A] is symmetric then [A] = [V][D][V]T ([I] = [V][V]T).

Author:
apete

Method Summary
 boolean compute(Access2D<?> aMtrx, boolean eigenvaluesOnly)
           
 MatrixStore<N> getD()
          The only requirements on [D] are that it should contain the eigenvalues and that [A][V] = [V][D].
 ComplexNumber getDeterminant()
           A matrix' determinant is the product of its eigenvalues.
 Array1D<ComplexNumber> getEigenvalues()
           Even for real matrices the eigenvalues are potentially complex numbers.
 ComplexNumber getTrace()
          A matrix' trace is the sum of the diagonal elements.
 MatrixStore<N> getV()
          The columns of [V] represent the eigenvectors of [A] in the sense that [A][V] = [V][D].
 boolean isOrdered()
           
 boolean isSymmetric()
           
 
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
compute, equals, equals, getInverse, getInverse, isComputed, isFullSize, isSolvable, reconstruct, reset, solve, solve
 

Method Detail

compute

boolean compute(Access2D<?> aMtrx,
                boolean eigenvaluesOnly)
Parameters:
aMtrx - A matrix to decompose
eigenvaluesOnly - No need to calculate eigenvectors
Returns:
true/false if the computation succeeded or not

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.

Returns:
The (block) diagonal eigenvalue matrix.

getDeterminant

ComplexNumber getDeterminant()

A matrix' determinant is the product of its eigenvalues.

Returns:
The matrix' determinant

getEigenvalues

Array1D<ComplexNumber> getEigenvalues()

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

The eigenvalues in this array should be ordered in descending order - largest (modulus) first.

Returns:
The eigenvalues in an ordered array.

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.

isOrdered

boolean isOrdered()

isSymmetric

boolean isSymmetric()