public class EigenValueDecomposition
extends java.lang.Object
A = V*D*V-1
If A is symmetric, then A = V*D*V' where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal.
Given a linear transformation A, a non-zero vector x is defined to be an eigenvector of the transformation if it satisfies the eigenvalue equation
A x = λ x
for some scalar λ. In this situation, the scalar λ is called an eigenvalue of A corresponding to the eigenvector x.
The word eigenvector formally refers to the right eigenvector, which is defined by the above eigenvalue equation A x = λ x, and is the most commonly used eigenvector. However, the left eigenvector exists as well, and is defined by x A = λ x.
Let A be a real n-by-n matrix with strictly positive entries aij > 0. Then the following statements hold.
A stochastic matrix, probability matrix, or transition matrix is used to describe the transitions of a Markov chain. A right stochastic matrix is a square matrix each of whose rows consists of nonnegative real numbers, with each row summing to 1. A left stochastic matrix is a square matrix whose columns consist of nonnegative real numbers whose sum is 1. A doubly stochastic matrix where all entries are nonnegative and all rows and all columns sum to 1. A stationary probability vector π is defined as a vector that does not change under application of the transition matrix; that is, it is defined as a left eigenvector of the probability matrix, associated with eigenvalue 1: πP = π. The Perron-Frobenius theorem ensures that such a vector exists, and that the largest eigenvalue associated with a stochastic matrix is always 1. For a matrix with strictly positive entries, this vector is unique. In general, however, there may be several such vectors.
| Constructor and Description |
|---|
EigenValueDecomposition(DenseMatrix A)
Full eigen value decomposition of a square matrix.
|
EigenValueDecomposition(DenseMatrix A,
boolean symmetric)
Full eigen value decomposition of a square matrix.
|
EigenValueDecomposition(DenseMatrix A,
boolean symmetric,
boolean onlyValues)
Full eigen value decomposition of a square matrix.
|
EigenValueDecomposition(double[][] A)
Full eigen value decomposition of a square matrix.
|
EigenValueDecomposition(double[][] A,
boolean symmetric)
Full eigen value decomposition of a square matrix.
|
EigenValueDecomposition(double[][] A,
boolean symmetric,
boolean onlyValues)
Full eigen value decomposition of a square matrix.
|
| Modifier and Type | Method and Description |
|---|---|
DenseMatrix |
getD()
Returns the block diagonal eigenvalue matrix whose diagonal are the real
part of eigenvalues, lower subdiagonal are positive imaginary parts, and
upper subdiagonal are negative imaginary parts.
|
double[] |
getEigenValues()
Returns the eigenvalues, ordered from largest to smallest.
|
DenseMatrix |
getEigenVectors()
Returns the eigenvector matrix, ordered by eigen values from largest to smallest.
|
double[] |
getImagEigenValues()
Returns the imaginary parts of the eigenvalues, ordered in real part
from largest to smallest.
|
double[] |
getRealEigenValues()
Returns the real parts of the eigenvalues, ordered in real part from
largest to smallest.
|
public EigenValueDecomposition(double[][] A)
A - square matrix which will be altered during decomposition.public EigenValueDecomposition(double[][] A,
boolean symmetric)
A - square matrix which will be altered during decomposition.symmetric - if the matrix A is symmetric.public EigenValueDecomposition(double[][] A,
boolean symmetric,
boolean onlyValues)
A - square matrix which will be altered during decomposition.symmetric - if the matrix A is symmetric.onlyValues - if true, only compute eigenvalues; the default is to compute eigenvectors also.public EigenValueDecomposition(DenseMatrix A)
A - square matrix which will be altered during decomposition.public EigenValueDecomposition(DenseMatrix A, boolean symmetric)
A - square matrix which will be altered during decomposition.symmetric - if the matrix A is symmetric.public EigenValueDecomposition(DenseMatrix A, boolean symmetric, boolean onlyValues)
A - square matrix which will be altered during decomposition.symmetric - if the matrix A is symmetric.onlyValues - if true, only compute eigenvalues; the default is to compute eigenvectors also.public DenseMatrix getEigenVectors()
public double[] getEigenValues()
public double[] getRealEigenValues()
public double[] getImagEigenValues()
public DenseMatrix getD()