Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem. More...
#include <GeneralizedSelfAdjointEigenSolver.h>

| Public Types | |
| typedef Base::Index | Index | 
| typedef _MatrixType | MatrixType | 
|  Public Types inherited from Eigen::SelfAdjointEigenSolver< _MatrixType > | |
| enum | { Size = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime } | 
| typedef MatrixType::Index | Index | 
| typedef _MatrixType | MatrixType | 
| typedef NumTraits< Scalar >::Real | RealScalar | 
| Real scalar type for _MatrixType.  More... | |
| typedef internal::plain_col_type< MatrixType, RealScalar >::type | RealVectorType | 
| Type for vector of eigenvalues as returned by eigenvalues().  More... | |
| typedef MatrixType::Scalar | Scalar | 
| Scalar type for matrices of type _MatrixType.  More... | |
| typedef Tridiagonalization< MatrixType > | TridiagonalizationType | 
| Public Member Functions | |
| GeneralizedSelfAdjointEigenSolver & | compute (const MatrixType &matA, const MatrixType &matB, int options=ComputeEigenvectors|Ax_lBx) | 
| Computes generalized eigendecomposition of given matrix pencil.  More... | |
| GeneralizedSelfAdjointEigenSolver () | |
| Default constructor for fixed-size matrices.  More... | |
| GeneralizedSelfAdjointEigenSolver (Index size) | |
| Constructor, pre-allocates memory for dynamic-size matrices.  More... | |
| GeneralizedSelfAdjointEigenSolver (const MatrixType &matA, const MatrixType &matB, int options=ComputeEigenvectors|Ax_lBx) | |
| Constructor; computes generalized eigendecomposition of given matrix pencil.  More... | |
|  Public Member Functions inherited from Eigen::SelfAdjointEigenSolver< _MatrixType > | |
| SelfAdjointEigenSolver & | compute (const MatrixType &matrix, int options=ComputeEigenvectors) | 
| Computes eigendecomposition of given matrix.  More... | |
| SelfAdjointEigenSolver & | computeDirect (const MatrixType &matrix, int options=ComputeEigenvectors) | 
| Computes eigendecomposition of given matrix using a direct algorithm.  More... | |
| const RealVectorType & | eigenvalues () const | 
| Returns the eigenvalues of given matrix.  More... | |
| const MatrixType & | eigenvectors () const | 
| Returns the eigenvectors of given matrix.  More... | |
| ComputationInfo | info () const | 
| Reports whether previous computation was successful.  More... | |
| MatrixType | operatorInverseSqrt () const | 
| Computes the inverse square root of the matrix.  More... | |
| MatrixType | operatorSqrt () const | 
| Computes the positive-definite square root of the matrix.  More... | |
| SelfAdjointEigenSolver () | |
| Default constructor for fixed-size matrices.  More... | |
| SelfAdjointEigenSolver (Index size) | |
| Constructor, pre-allocates memory for dynamic-size matrices.  More... | |
| SelfAdjointEigenSolver (const MatrixType &matrix, int options=ComputeEigenvectors) | |
| Constructor; computes eigendecomposition of given matrix.  More... | |
| Private Types | |
| typedef SelfAdjointEigenSolver< _MatrixType > | Base | 
| Additional Inherited Members | |
|  Static Public Attributes inherited from Eigen::SelfAdjointEigenSolver< _MatrixType > | |
| static const int | m_maxIterations = 30 | 
| Maximum number of iterations.  More... | |
|  Protected Attributes inherited from Eigen::SelfAdjointEigenSolver< _MatrixType > | |
| bool | m_eigenvectorsOk | 
| RealVectorType | m_eivalues | 
| MatrixType | m_eivec | 
| ComputationInfo | m_info | 
| bool | m_isInitialized | 
| TridiagonalizationType::SubDiagonalType | m_subdiag | 
Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.
| _MatrixType | the type of the matrix of which we are computing the eigendecomposition; this is expected to be an instantiation of the Matrix class template. | 
This class solves the generalized eigenvalue problem  . In this case, the matrix
. In this case, the matrix  should be selfadjoint and the matrix
 should be selfadjoint and the matrix  should be positive definite.
 should be positive definite.
Only the lower triangular part of the input matrix is referenced.
Call the function compute() to compute the eigenvalues and eigenvectors of a given matrix. Alternatively, you can use the GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int) constructor which computes the eigenvalues and eigenvectors at construction time. Once the eigenvalue and eigenvectors are computed, they can be retrieved with the eigenvalues() and eigenvectors() functions.
The documentation for GeneralizedSelfAdjointEigenSolver(const MatrixType&, const MatrixType&, int) contains an example of the typical use of this class.
Definition at line 48 of file GeneralizedSelfAdjointEigenSolver.h.
| 
 | private | 
Definition at line 50 of file GeneralizedSelfAdjointEigenSolver.h.
| typedef Base::Index Eigen::GeneralizedSelfAdjointEigenSolver< _MatrixType >::Index | 
Definition at line 53 of file GeneralizedSelfAdjointEigenSolver.h.
| typedef _MatrixType Eigen::GeneralizedSelfAdjointEigenSolver< _MatrixType >::MatrixType | 
Definition at line 54 of file GeneralizedSelfAdjointEigenSolver.h.
| 
 | inline | 
Default constructor for fixed-size matrices.
The default constructor is useful in cases in which the user intends to perform decompositions via compute(). This constructor can only be used if _MatrixType is a fixed-size matrix; use GeneralizedSelfAdjointEigenSolver(Index) for dynamic-size matrices. 
Definition at line 63 of file GeneralizedSelfAdjointEigenSolver.h.
| 
 | inline | 
Constructor, pre-allocates memory for dynamic-size matrices.
| [in] | size | Positive integer, size of the matrix whose eigenvalues and eigenvectors will be computed. | 
This constructor is useful for dynamic-size matrices, when the user intends to perform decompositions via compute(). The size parameter is only used as a hint. It is not an error to give a wrong size, but it may impair performance.
Definition at line 77 of file GeneralizedSelfAdjointEigenSolver.h.
| 
 | inline | 
Constructor; computes generalized eigendecomposition of given matrix pencil.
| [in] | matA | Selfadjoint matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. | 
| [in] | matB | Positive-definite matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. | 
| [in] | options | A or-ed set of flags {ComputeEigenvectors,EigenvaluesOnly} | {Ax_lBx,ABx_lx,BAx_lx}. Default is ComputeEigenvectors|Ax_lBx. | 
This constructor calls compute(const MatrixType&, const MatrixType&, int) to compute the eigenvalues and (if requested) the eigenvectors of the generalized eigenproblem  with matA the selfadjoint matrix
 with matA the selfadjoint matrix  and matB the positive definite matrix
 and matB the positive definite matrix  . Each eigenvector
. Each eigenvector  satisfies the property
 satisfies the property  . The eigenvectors are computed if options contains ComputeEigenvectors.
. The eigenvectors are computed if options contains ComputeEigenvectors.
In addition, the two following variants can be solved via options: 
ABx_lx: 
BAx_lx: 
Example:
Output:
Definition at line 107 of file GeneralizedSelfAdjointEigenSolver.h.
| GeneralizedSelfAdjointEigenSolver< MatrixType > & Eigen::GeneralizedSelfAdjointEigenSolver< MatrixType >::compute | ( | const MatrixType & | matA, | 
| const MatrixType & | matB, | ||
| int | options = ComputeEigenvectors|Ax_lBx | ||
| ) | 
Computes generalized eigendecomposition of given matrix pencil.
| [in] | matA | Selfadjoint matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. | 
| [in] | matB | Positive-definite matrix in matrix pencil. Only the lower triangular part of the matrix is referenced. | 
| [in] | options | A or-ed set of flags {ComputeEigenvectors,EigenvaluesOnly} | {Ax_lBx,ABx_lx,BAx_lx}. Default is ComputeEigenvectors|Ax_lBx. | 
*this Accoring to options, this function computes eigenvalues and (if requested) the eigenvectors of one of the following three generalized eigenproblems:
Ax_lBx: 
ABx_lx: 
BAx_lx:  with matA the selfadjoint matrix
 with matA the selfadjoint matrix  and matB the positive definite matrix
 and matB the positive definite matrix  . In addition, each eigenvector
. In addition, each eigenvector  satisfies the property
 satisfies the property  .
.The eigenvalues() function can be used to retrieve the eigenvalues. If options contains ComputeEigenvectors, then the eigenvectors are also computed and can be retrieved by calling eigenvectors().
The implementation uses LLT to compute the Cholesky decomposition  and computes the classical eigendecomposition of the selfadjoint matrix
 and computes the classical eigendecomposition of the selfadjoint matrix  if
 if options contains Ax_lBx and of  otherwise. This solves the generalized eigenproblem, because any solution of the generalized eigenproblem
 otherwise. This solves the generalized eigenproblem, because any solution of the generalized eigenproblem  corresponds to a solution
 corresponds to a solution  of the eigenproblem for
 of the eigenproblem for  . Similar statements can be made for the two other variants.
. Similar statements can be made for the two other variants.
Example:
Output:
Definition at line 164 of file GeneralizedSelfAdjointEigenSolver.h.