Click or drag to resize
Accord.NET (logo)

GeneralizedEigenvalueDecomposition Class

Determines the Generalized eigenvalues and eigenvectors of two real square matrices.
Inheritance Hierarchy
SystemObject
  Accord.Math.DecompositionsGeneralizedEigenvalueDecomposition

Namespace:  Accord.Math.Decompositions
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.7.0
Syntax
public sealed class GeneralizedEigenvalueDecomposition : ICloneable
Request Example View Source

The GeneralizedEigenvalueDecomposition type exposes the following members.

Constructors
  NameDescription
Public methodGeneralizedEigenvalueDecomposition
Constructs a new generalized eigenvalue decomposition.
Top
Properties
  NameDescription
Public propertyBetas
Returns the beta values.
Public propertyDiagonalMatrix
Returns the block diagonal eigenvalue matrix.
Public propertyEigenvectors
Returns the eigenvector matrix.
Public propertyImaginaryAlphas
Returns the imaginary parts of the alpha values.
Public propertyImaginaryEigenvalues
Returns the imaginary parts of the eigenvalues.
Public propertyIsDegenerate
Returns true if the eigenvalue problem is degenerate (ill-posed).
Public propertyIsSingular
Returns true if matrix B is singular.
Public propertyRealAlphas
Returns the real parts of the alpha values.
Public propertyRealEigenvalues
Returns the real parts of the eigenvalues.
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodToT
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

A generalized eigenvalue problem is the problem of finding a vector v that obeys A * v = λ * B * v where A and B are matrices. If v obeys this equation, with some λ, then we call v the generalized eigenvector of A and B, and λ is called the generalized eigenvalue of A and B which corresponds to the generalized eigenvector v. The possible values of λ, must obey the identity det(A - λ*B) = 0.

Part of this code has been adapted from the original EISPACK routines in Fortran.

References:

Examples
// Suppose we have the following // matrices A and B shown below: double[,] A = { { 1, 2, 3}, { 8, 1, 4}, { 3, 2, 3} }; double[,] B = { { 5, 1, 1}, { 1, 5, 1}, { 1, 1, 5} }; // Now, suppose we would like to find values for λ // that are solutions for the equation det(A - λB) = 0 // For this, we can use a Generalized Eigendecomposition var gevd = new GeneralizedEigenvalueDecomposition(A, B); // Now, if A and B are Hermitian and B is positive // -definite, then the eigenvalues λ will be real: double[] lambda = gevd.RealEigenvalues; // Lets check if they are indeed a solution: for (int i = 0; i < lambda.Length; i++) { // Compute the determinant equation show above double det = Matrix.Determinant(A.Subtract(lambda[i].Multiply(B))); // almost zero }
See Also