Class EigenvalueDecomposition
Determines the eigenvalues and eigenvectors of a real square matrix.
Inheritance
Namespace: ISynergy.Framework.Mathematics.Decompositions
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public sealed class EigenvalueDecomposition : ICloneable
Remarks
In the mathematical discipline of linear algebra, eigendecomposition or sometimes spectral decomposition is the factorization of a matrix into a canonical form, whereby the matrix is represented in terms of its eigenvalues and eigenvectors.
If A is symmetric, then A = V * D * V' and A = V * V'
where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal.
If A is not symmetric, the eigenvalue matrix D is block diagonal
with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues,
lambda + i*mu, in 2-by-2 blocks, [lambda, mu; -mu, lambda].
The columns of V represent the eigenvectors in the sense that A * V = V * D.
The matrix V may be badly conditioned, or even singular, so the validity of the equation
A = V * D * inverse(V) depends upon the condition of V.
Constructors
View SourceEigenvalueDecomposition(Double[,], Boolean, Boolean)
Construct an eigenvalue decomposition.
Declaration
public EigenvalueDecomposition(double[, ] value, bool inPlace = false, bool sort = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[,] | value | The matrix to be decomposed. |
| System.Boolean | inPlace | Pass true to perform the decomposition in place. The matrix
|
| System.Boolean | sort | Pass true to sort the eigenvalues and eigenvectors at the end of the decomposition. |
EigenvalueDecomposition(Double[,], Boolean, Boolean, Boolean)
Construct an eigenvalue decomposition.
Declaration
public EigenvalueDecomposition(double[, ] value, bool assumeSymmetric, bool inPlace = false, bool sort = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[,] | value | The matrix to be decomposed. |
| System.Boolean | assumeSymmetric | Defines if the matrix should be assumed as being symmetric regardless if it is or not. Default is false. |
| System.Boolean | inPlace | Pass true to perform the decomposition in place. The matrix
|
| System.Boolean | sort | Pass true to sort the eigenvalues and eigenvectors at the end of the decomposition. |
Properties
View SourceDiagonalMatrix
Returns the block diagonal eigenvalue matrix.
Declaration
public double[, ] DiagonalMatrix { get; }
Property Value
| Type | Description |
|---|---|
| System.Double[,] |
Eigenvectors
Returns the eigenvector matrix.
Declaration
public double[, ] Eigenvectors { get; }
Property Value
| Type | Description |
|---|---|
| System.Double[,] |
ImaginaryEigenvalues
Returns the imaginary parts of the eigenvalues.
Declaration
public double[] ImaginaryEigenvalues { get; }
Property Value
| Type | Description |
|---|---|
| System.Double[] |
Rank
Returns the effective numerical matrix rank.
Declaration
public int Rank { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | Number of non-negligible eigen values. |
RealEigenvalues
Returns the real parts of the eigenvalues.
Declaration
public double[] RealEigenvalues { get; }
Property Value
| Type | Description |
|---|---|
| System.Double[] |
Methods
View SourceClone()
Creates a new object that is a copy of the current instance.
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new object that is a copy of this instance. |
Reverse()
Reverses the decomposition, reconstructing the original matrix X.
Declaration
public double[, ] Reverse()
Returns
| Type | Description |
|---|---|
| System.Double[,] |