11 #ifndef EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H
12 #define EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H
14 #include "./Tridiagonalization.h"
16 #include "./InternalHeaderCheck.h"
49 template<
typename MatrixType_>
55 typedef MatrixType_ MatrixType;
163 template<
typename MatrixType>
165 compute(
const MatrixType& matA,
const MatrixType& matB,
int options)
167 eigen_assert(matA.cols()==matA.rows() && matB.rows()==matA.rows() && matB.cols()==matB.rows());
168 eigen_assert((options&~(EigVecMask|GenEigMask))==0
169 && (options&EigVecMask)!=EigVecMask
170 && ((options&GenEigMask)==0 || (options&GenEigMask)==
Ax_lBx
171 || (options&GenEigMask)==
ABx_lx || (options&GenEigMask)==
BAx_lx)
172 &&
"invalid option parameter");
174 bool computeEigVecs = ((options&EigVecMask)==0) || ((options&EigVecMask)==
ComputeEigenvectors);
179 int type = (options&GenEigMask);
186 MatrixType matC = matA.template selfadjointView<Lower>();
187 cholB.
matrixL().template solveInPlace<OnTheLeft>(matC);
188 cholB.
matrixU().template solveInPlace<OnTheRight>(matC);
194 cholB.
matrixU().solveInPlace(Base::m_eivec);
199 MatrixType matC = matA.template selfadjointView<Lower>();
207 cholB.
matrixU().solveInPlace(Base::m_eivec);
212 MatrixType matC = matA.template selfadjointView<Lower>();
220 Base::m_eivec = cholB.
matrixL() * Base::m_eivec;
Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.
Definition: GeneralizedSelfAdjointEigenSolver.h:51
GeneralizedSelfAdjointEigenSolver()
Default constructor for fixed-size matrices.
Definition: GeneralizedSelfAdjointEigenSolver.h:64
GeneralizedSelfAdjointEigenSolver(Index size)
Constructor, pre-allocates memory for dynamic-size matrices.
Definition: GeneralizedSelfAdjointEigenSolver.h:78
GeneralizedSelfAdjointEigenSolver & compute(const MatrixType &matA, const MatrixType &matB, int options=ComputeEigenvectors|Ax_lBx)
Computes generalized eigendecomposition of given matrix pencil.
Definition: GeneralizedSelfAdjointEigenSolver.h:165
GeneralizedSelfAdjointEigenSolver(const MatrixType &matA, const MatrixType &matB, int options=ComputeEigenvectors|Ax_lBx)
Constructor; computes generalized eigendecomposition of given matrix pencil.
Definition: GeneralizedSelfAdjointEigenSolver.h:108
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition: LLT.h:70
Traits::MatrixU matrixU() const
Definition: LLT.h:130
Traits::MatrixL matrixL() const
Definition: LLT.h:137
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Definition: SelfAdjointEigenSolver.h:79
Eigen::Index Index
Definition: SelfAdjointEigenSolver.h:92
@ Ax_lBx
Definition: Constants.h:412
@ ComputeEigenvectors
Definition: Constants.h:407
@ BAx_lx
Definition: Constants.h:418
@ ABx_lx
Definition: Constants.h:415
@ EigenvaluesOnly
Definition: Constants.h:404
Namespace containing all symbols from the Eigen library.
Definition: Core:139