163compute(
const MatrixType& matA,
const MatrixType& matB,
int options)
165 eigen_assert(matA.cols()==matA.rows() && matB.rows()==matA.rows() && matB.cols()==matB.rows());
166 eigen_assert((options&~(EigVecMask|GenEigMask))==0
167 && (options&EigVecMask)!=EigVecMask
168 && ((options&GenEigMask)==0 || (options&GenEigMask)==
Ax_lBx
169 || (options&GenEigMask)==
ABx_lx || (options&GenEigMask)==
BAx_lx)
170 &&
"invalid option parameter");
172 bool computeEigVecs = ((options&EigVecMask)==0) || ((options&EigVecMask)==
ComputeEigenvectors);
175 LLT<MatrixType> cholB(matB);
177 int type = (options&GenEigMask);
184 MatrixType matC = matA.template selfadjointView<Lower>();
185 cholB.matrixL().template solveInPlace<OnTheLeft>(matC);
186 cholB.matrixU().template solveInPlace<OnTheRight>(matC);
192 cholB.matrixU().solveInPlace(Base::m_eivec);
197 MatrixType matC = matA.template selfadjointView<Lower>();
198 matC = matC * cholB.matrixL();
199 matC = cholB.matrixU() * matC;
205 cholB.matrixU().solveInPlace(Base::m_eivec);
210 MatrixType matC = matA.template selfadjointView<Lower>();
211 matC = matC * cholB.matrixL();
212 matC = cholB.matrixU() * matC;
218 Base::m_eivec = cholB.matrixL() * Base::m_eivec;
GeneralizedSelfAdjointEigenSolver & compute(const MatrixType &matA, const MatrixType &matB, int options=ComputeEigenvectors|Ax_lBx)
Computes generalized eigendecomposition of given matrix pencil.
Definition GeneralizedSelfAdjointEigenSolver.h:163
GeneralizedSelfAdjointEigenSolver(const MatrixType &matA, const MatrixType &matB, int options=ComputeEigenvectors|Ax_lBx)
Constructor; computes generalized eigendecomposition of given matrix pencil.
Definition GeneralizedSelfAdjointEigenSolver.h:106