Record Class EVD

Record Components:
wr - the real part of eigenvalues. By default, the eigenvalues and eigenvectors are not always in sorted order. The sort function puts the eigenvalues in descending order and reorder the corresponding eigenvectors.
wi - the imaginary part of eigenvalues.
Vl - the left eigenvectors.
Vr - the right eigenvectors.
All Implemented Interfaces:
Serializable

public record EVD(Vector wr, Vector wi, DenseMatrix Vl, DenseMatrix Vr) extends Record implements Serializable
Eigenvalue decomposition. Eigen decomposition is the factorization of a matrix into a canonical form, whereby the matrix is represented in terms of its eigenvalues and eigenvectors:
    A = V*D*V<sup>-1</sup>
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 = &lambda; 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.

  1. There is a positive real number r, called the Perron-Frobenius eigenvalue, such that r is an eigenvalue of A and any other eigenvalue λ (possibly complex) is strictly smaller than r in absolute value, |λ| < r.
  2. The Perron-Frobenius eigenvalue is simple: r is a simple root of the characteristic polynomial of A. Consequently, both the right and the left eigenspace associated to r is one-dimensional.
  3. There exists a left eigenvector v of A associated with r (row vector) having strictly positive components. Likewise, there exists a right eigenvector w associated with r (column vector) having strictly positive components.
  4. The left eigenvector v (respectively right w) associated with r, is the only eigenvector which has positive components, i.e. for all other eigenvectors of A there exists a component which is not positive.

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 non-negative real numbers, with each row summing to 1. A left stochastic matrix is a square matrix whose columns consist of non-negative real numbers whose sum is 1. A doubly stochastic matrix where all entries are non-negative 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.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    Creates an instance of a EVD record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Sorts the eigenvalues in descending order and reorders the corresponding eigenvectors.
    final String
    Returns a string representation of this record class.
    Vl()
    Returns the value of the Vl record component.
    Vr()
    Returns the value of the Vr record component.
    wi()
    Returns the value of the wi record component.
    wr()
    Returns the value of the wr record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • EVD

      public EVD(Vector w, DenseMatrix V)
      Constructor.
      Parameters:
      w - eigenvalues.
      V - eigenvectors.
    • EVD

      public EVD(Vector wr, Vector wi, DenseMatrix Vl, DenseMatrix Vr)
      Creates an instance of a EVD record class.
      Parameters:
      wr - the value for the wr record component
      wi - the value for the wi record component
      Vl - the value for the Vl record component
      Vr - the value for the Vr record component
  • Method Details

    • diag

      public DenseMatrix diag()
      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.
      Returns:
      the diagonal eigenvalue matrix.
    • sort

      public EVD sort()
      Sorts the eigenvalues in descending order and reorders the corresponding eigenvectors.
      Returns:
      sorted eigen decomposition.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • wr

      public Vector wr()
      Returns the value of the wr record component.
      Returns:
      the value of the wr record component
    • wi

      public Vector wi()
      Returns the value of the wi record component.
      Returns:
      the value of the wi record component
    • Vl

      public DenseMatrix Vl()
      Returns the value of the Vl record component.
      Returns:
      the value of the Vl record component
    • Vr

      public DenseMatrix Vr()
      Returns the value of the Vr record component.
      Returns:
      the value of the Vr record component