11 #ifndef EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H 12 #define EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H 14 #include "./Tridiagonalization.h" 47 template<
typename _MatrixType>
53 typedef _MatrixType MatrixType;
161 template<
typename MatrixType>
163 compute(
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);
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>();
205 cholB.
matrixU().solveInPlace(Base::m_eivec);
210 MatrixType matC = matA.template selfadjointView<Lower>();
218 Base::m_eivec = cholB.
matrixL() * Base::m_eivec;
226 #endif // EIGEN_GENERALIZEDSELFADJOINTEIGENSOLVER_H GeneralizedSelfAdjointEigenSolver(Index size)
Constructor, pre-allocates memory for dynamic-size matrices.
Definition: GeneralizedSelfAdjointEigenSolver.h:76
Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify that only the eigenva...
Definition: Constants.h:392
EIGEN_DEVICE_FUNC SelfAdjointEigenSolver & compute(const EigenBase< InputType > &matrix, int options=ComputeEigenvectors)
Computes eigendecomposition of given matrix.
Definition: SelfAdjointEigenSolver.h:70
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition: Constants.h:403
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition: Constants.h:406
Used in GeneralizedSelfAdjointEigenSolver to indicate that it should solve the generalized eigenprobl...
Definition: Constants.h:400
Eigen::Index Index
Definition: SelfAdjointEigenSolver.h:84
Used in SelfAdjointEigenSolver and GeneralizedSelfAdjointEigenSolver to specify that both the eigenva...
Definition: Constants.h:395
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
Definition: LLT.h:52
Definition: GeneralizedSelfAdjointEigenSolver.h:48
Traits::MatrixL matrixL() const
Definition: LLT.h:122
Traits::MatrixU matrixU() const
Definition: LLT.h:115
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
GeneralizedSelfAdjointEigenSolver()
Default constructor for fixed-size matrices.
Definition: GeneralizedSelfAdjointEigenSolver.h:62