Eigen::GeneralizedEigenSolver< MatrixType_ > Class Template Reference

Computes the generalized eigenvalues and eigenvectors of a pair of general matrices. More...

Public Types

enum  {
  RowsAtCompileTime ,
  ColsAtCompileTime ,
  Options ,
  MaxRowsAtCompileTime ,
  MaxColsAtCompileTime
}
 
typedef std::complex< RealScalarComplexScalar
 Complex scalar type for MatrixType. More...
 
typedef Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > ComplexVectorType
 Type for vector of complex scalar values eigenvalues as returned by alphas(). More...
 
typedef CwiseBinaryOp< internal::scalar_quotient_op< ComplexScalar, Scalar >, ComplexVectorType, VectorTypeEigenvalueType
 Expression type for the eigenvalues as returned by eigenvalues(). More...
 
typedef Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTimeEigenvectorsType
 Type for matrix of eigenvectors as returned by eigenvectors(). More...
 
typedef Eigen::Index Index
 
typedef MatrixType_ MatrixType
 Synonym for the template parameter MatrixType_. More...
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef MatrixType::Scalar Scalar
 Scalar type for matrices of type MatrixType. More...
 
typedef Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > VectorType
 Type for vector of real scalar values eigenvalues as returned by betas(). More...
 

Public Member Functions

const ComplexVectorTypealphas () const
 
const VectorTypebetas () const
 
GeneralizedEigenSolvercompute (const MatrixType &A, const MatrixType &B, bool computeEigenvectors=true)
 Computes generalized eigendecomposition of given matrix. More...
 
EigenvalueType eigenvalues () const
 Returns an expression of the computed generalized eigenvalues. More...
 
EigenvectorsType eigenvectors () const
 
 GeneralizedEigenSolver ()
 Default constructor. More...
 
 GeneralizedEigenSolver (const MatrixType &A, const MatrixType &B, bool computeEigenvectors=true)
 Constructor; computes the generalized eigendecomposition of given matrix pair. More...
 
 GeneralizedEigenSolver (Index size)
 Default constructor with memory preallocation. More...
 
ComputationInfo info () const
 
GeneralizedEigenSolversetMaxIterations (Index maxIters)
 

Protected Attributes

ComplexVectorType m_alphas
 
VectorType m_betas
 
bool m_computeEigenvectors
 
EigenvectorsType m_eivec
 
bool m_isInitialized
 
RealQZ< MatrixTypem_realQZ
 
ComplexVectorType m_tmp
 

Detailed Description

template<typename MatrixType_>
class Eigen::GeneralizedEigenSolver< MatrixType_ >

Computes the generalized eigenvalues and eigenvectors of a pair of general matrices.

This is defined in the Eigenvalues module.

Template Parameters
MatrixType_the type of the matrices of which we are computing the eigen-decomposition; this is expected to be an instantiation of the Matrix class template. Currently, only real matrices are supported.

The generalized eigenvalues and eigenvectors of a matrix pair \( A \) and \( B \) are scalars \( \lambda \) and vectors \( v \) such that \( Av = \lambda Bv \). If \( D \) is a diagonal matrix with the eigenvalues on the diagonal, and \( V \) is a matrix with the eigenvectors as its columns, then \( A V = B V D \). The matrix \( V \) is almost always invertible, in which case we have \( A = B V D V^{-1} \). This is called the generalized eigen-decomposition.

The generalized eigenvalues and eigenvectors of a matrix pair may be complex, even when the matrices are real. Moreover, the generalized eigenvalue might be infinite if the matrix B is singular. To workaround this difficulty, the eigenvalues are provided as a pair of complex \( \alpha \) and real \( \beta \) such that: \( \lambda_i = \alpha_i / \beta_i \). If \( \beta_i \) is (nearly) zero, then one can consider the well defined left eigenvalue \( \mu = \beta_i / \alpha_i\) such that: \( \mu_i A v_i = B v_i \), or even \( \mu_i u_i^T A = u_i^T B \) where \( u_i \) is called the left eigenvector.

Call the function compute() to compute the generalized eigenvalues and eigenvectors of a given matrix pair. Alternatively, you can use the GeneralizedEigenSolver(const MatrixType&, const MatrixType&, bool) 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.

Here is an usage example of this class: Example:

GeneralizedEigenSolver<MatrixXf> ges;
ges.compute(A, B);
cout << "The (complex) numerators of the generalzied eigenvalues are: " << ges.alphas().transpose() << endl;
cout << "The (real) denominatore of the generalzied eigenvalues are: " << ges.betas().transpose() << endl;
cout << "The (complex) generalzied eigenvalues are (alphas./beta): " << ges.eigenvalues().transpose() << endl;
MatrixXcf A
MatrixXf B
GeneralizedEigenSolver< MatrixXf > ges
static const RandomReturnType Random()
Definition: Random.h:114
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.
Definition: Matrix.h:501

Output:

The (complex) numerators of the generalzied eigenvalues are:  (-0.126,0.569) (-0.126,-0.569)      (-0.398,0)       (-1.12,0)
The (real) denominatore of the generalzied eigenvalues are: -1.56 -1.56 -1.25 0.746
The (complex) generalzied eigenvalues are (alphas./beta): (0.081,-0.365)  (0.081,0.365)     (0.318,-0)       (-1.5,0)
See also
MatrixBase::eigenvalues(), class ComplexEigenSolver, class SelfAdjointEigenSolver

Definition at line 60 of file GeneralizedEigenSolver.h.

Member Typedef Documentation

◆ ComplexScalar

template<typename MatrixType_ >
typedef std::complex<RealScalar> Eigen::GeneralizedEigenSolver< MatrixType_ >::ComplexScalar

Complex scalar type for MatrixType.

This is std::complex<Scalar> if Scalar is real (e.g., float or double) and just Scalar if Scalar is complex.

Definition at line 86 of file GeneralizedEigenSolver.h.

◆ ComplexVectorType

template<typename MatrixType_ >
typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> Eigen::GeneralizedEigenSolver< MatrixType_ >::ComplexVectorType

Type for vector of complex scalar values eigenvalues as returned by alphas().

This is a column vector with entries of type ComplexScalar. The length of the vector is the size of MatrixType.

Definition at line 100 of file GeneralizedEigenSolver.h.

◆ EigenvalueType

template<typename MatrixType_ >
typedef CwiseBinaryOp<internal::scalar_quotient_op<ComplexScalar,Scalar>,ComplexVectorType,VectorType> Eigen::GeneralizedEigenSolver< MatrixType_ >::EigenvalueType

Expression type for the eigenvalues as returned by eigenvalues().

Definition at line 104 of file GeneralizedEigenSolver.h.

◆ EigenvectorsType

Type for matrix of eigenvectors as returned by eigenvectors().

This is a square matrix with entries of type ComplexScalar. The size is the same as the size of MatrixType.

Definition at line 111 of file GeneralizedEigenSolver.h.

◆ Index

template<typename MatrixType_ >
typedef Eigen::Index Eigen::GeneralizedEigenSolver< MatrixType_ >::Index
Deprecated:
since Eigen 3.3

Definition at line 78 of file GeneralizedEigenSolver.h.

◆ MatrixType

template<typename MatrixType_ >
typedef MatrixType_ Eigen::GeneralizedEigenSolver< MatrixType_ >::MatrixType

Synonym for the template parameter MatrixType_.

Definition at line 65 of file GeneralizedEigenSolver.h.

◆ RealScalar

template<typename MatrixType_ >
typedef NumTraits<Scalar>::Real Eigen::GeneralizedEigenSolver< MatrixType_ >::RealScalar

Definition at line 77 of file GeneralizedEigenSolver.h.

◆ Scalar

template<typename MatrixType_ >
typedef MatrixType::Scalar Eigen::GeneralizedEigenSolver< MatrixType_ >::Scalar

Scalar type for matrices of type MatrixType.

Definition at line 76 of file GeneralizedEigenSolver.h.

◆ VectorType

template<typename MatrixType_ >
typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> Eigen::GeneralizedEigenSolver< MatrixType_ >::VectorType

Type for vector of real scalar values eigenvalues as returned by betas().

This is a column vector with entries of type Scalar. The length of the vector is the size of MatrixType.

Definition at line 93 of file GeneralizedEigenSolver.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename MatrixType_ >
anonymous enum
Enumerator
RowsAtCompileTime 
ColsAtCompileTime 
Options 
MaxRowsAtCompileTime 
MaxColsAtCompileTime 

Definition at line 67 of file GeneralizedEigenSolver.h.

67  {
68  RowsAtCompileTime = MatrixType::RowsAtCompileTime,
69  ColsAtCompileTime = MatrixType::ColsAtCompileTime,
70  Options = MatrixType::Options,
71  MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
72  MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
73  };

Constructor & Destructor Documentation

◆ GeneralizedEigenSolver() [1/3]

template<typename MatrixType_ >
Eigen::GeneralizedEigenSolver< MatrixType_ >::GeneralizedEigenSolver ( )
inline

Default constructor.

The default constructor is useful in cases in which the user intends to perform decompositions via EigenSolver::compute(const MatrixType&, bool).

See also
compute() for an example.

Definition at line 120 of file GeneralizedEigenSolver.h.

◆ GeneralizedEigenSolver() [2/3]

template<typename MatrixType_ >
Eigen::GeneralizedEigenSolver< MatrixType_ >::GeneralizedEigenSolver ( Index  size)
inlineexplicit

Default constructor with memory preallocation.

Like the default constructor but with preallocation of the internal data according to the specified problem size.

See also
GeneralizedEigenSolver()

Definition at line 135 of file GeneralizedEigenSolver.h.

136  : m_eivec(size, size),
137  m_alphas(size),
138  m_betas(size),
139  m_computeEigenvectors(false),
140  m_isInitialized(false),
141  m_realQZ(size),
142  m_tmp(size)
143  {}

◆ GeneralizedEigenSolver() [3/3]

template<typename MatrixType_ >
Eigen::GeneralizedEigenSolver< MatrixType_ >::GeneralizedEigenSolver ( const MatrixType A,
const MatrixType B,
bool  computeEigenvectors = true 
)
inline

Constructor; computes the generalized eigendecomposition of given matrix pair.

Parameters
[in]ASquare matrix whose eigendecomposition is to be computed.
[in]BSquare matrix whose eigendecomposition is to be computed.
[in]computeEigenvectorsIf true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed.

This constructor calls compute() to compute the generalized eigenvalues and eigenvectors.

See also
compute()

Definition at line 157 of file GeneralizedEigenSolver.h.

158  : m_eivec(A.rows(), A.cols()),
159  m_alphas(A.cols()),
160  m_betas(A.cols()),
161  m_computeEigenvectors(false),
162  m_isInitialized(false),
163  m_realQZ(A.cols()),
164  m_tmp(A.cols())
165  {
166  compute(A, B, computeEigenvectors);
167  }
GeneralizedEigenSolver & compute(const MatrixType &A, const MatrixType &B, bool computeEigenvectors=true)
Computes generalized eigendecomposition of given matrix.

Member Function Documentation

◆ alphas()

template<typename MatrixType_ >
const ComplexVectorType& Eigen::GeneralizedEigenSolver< MatrixType_ >::alphas ( ) const
inline
Returns
A const reference to the vectors containing the alpha values

This vector permits to reconstruct the j-th eigenvalues as alphas(i)/betas(j).

See also
betas(), eigenvalues()

Definition at line 216 of file GeneralizedEigenSolver.h.

217  {
218  eigen_assert(info() == Success && "GeneralizedEigenSolver failed to compute alphas.");
219  return m_alphas;
220  }
#define eigen_assert(x)
Definition: Macros.h:902
@ Success
Definition: Constants.h:446

◆ betas()

template<typename MatrixType_ >
const VectorType& Eigen::GeneralizedEigenSolver< MatrixType_ >::betas ( ) const
inline
Returns
A const reference to the vectors containing the beta values

This vector permits to reconstruct the j-th eigenvalues as alphas(i)/betas(j).

See also
alphas(), eigenvalues()

Definition at line 227 of file GeneralizedEigenSolver.h.

228  {
229  eigen_assert(info() == Success && "GeneralizedEigenSolver failed to compute betas.");
230  return m_betas;
231  }

◆ compute()

template<typename MatrixType >
GeneralizedEigenSolver< MatrixType > & Eigen::GeneralizedEigenSolver< MatrixType >::compute ( const MatrixType A,
const MatrixType B,
bool  computeEigenvectors = true 
)

Computes generalized eigendecomposition of given matrix.

Parameters
[in]ASquare matrix whose eigendecomposition is to be computed.
[in]BSquare matrix whose eigendecomposition is to be computed.
[in]computeEigenvectorsIf true, both the eigenvectors and the eigenvalues are computed; if false, only the eigenvalues are computed.
Returns
Reference to *this

This function computes the eigenvalues of the real matrix matrix. The eigenvalues() function can be used to retrieve them. If computeEigenvectors is true, then the eigenvectors are also computed and can be retrieved by calling eigenvectors().

The matrix is first reduced to real generalized Schur form using the RealQZ class. The generalized Schur decomposition is then used to compute the eigenvalues and eigenvectors.

The cost of the computation is dominated by the cost of the generalized Schur decomposition.

This method reuses of the allocated data in the GeneralizedEigenSolver object.

Definition at line 288 of file GeneralizedEigenSolver.h.

289 {
290  using std::sqrt;
291  using std::abs;
292  eigen_assert(A.cols() == A.rows() && B.cols() == A.rows() && B.cols() == B.rows());
293  Index size = A.cols();
294  // Reduce to generalized real Schur form:
295  // A = Q S Z and B = Q T Z
296  m_realQZ.compute(A, B, computeEigenvectors);
297  if (m_realQZ.info() == Success)
298  {
299  // Resize storage
302  if (computeEigenvectors)
303  {
305  m_tmp.resize(size);
306  }
307 
308  // Aliases:
309  Map<VectorType> v(reinterpret_cast<Scalar*>(m_tmp.data()), size);
310  ComplexVectorType &cv = m_tmp;
311  const MatrixType &mS = m_realQZ.matrixS();
312  const MatrixType &mT = m_realQZ.matrixT();
313 
314  Index i = 0;
315  while (i < size)
316  {
317  if (i == size - 1 || mS.coeff(i+1, i) == Scalar(0))
318  {
319  // Real eigenvalue
320  m_alphas.coeffRef(i) = mS.diagonal().coeff(i);
321  m_betas.coeffRef(i) = mT.diagonal().coeff(i);
322  if (computeEigenvectors)
323  {
324  v.setConstant(Scalar(0.0));
325  v.coeffRef(i) = Scalar(1.0);
326  // For singular eigenvalues do nothing more
328  {
329  // Non-singular eigenvalue
330  const Scalar alpha = real(m_alphas.coeffRef(i));
331  const Scalar beta = m_betas.coeffRef(i);
332  for (Index j = i-1; j >= 0; j--)
333  {
334  const Index st = j+1;
335  const Index sz = i-j;
336  if (j > 0 && mS.coeff(j, j-1) != Scalar(0))
337  {
338  // 2x2 block
339  Matrix<Scalar, 2, 1> rhs = (alpha*mT.template block<2,Dynamic>(j-1,st,2,sz) - beta*mS.template block<2,Dynamic>(j-1,st,2,sz)) .lazyProduct( v.segment(st,sz) );
340  Matrix<Scalar, 2, 2> lhs = beta * mS.template block<2,2>(j-1,j-1) - alpha * mT.template block<2,2>(j-1,j-1);
341  v.template segment<2>(j-1) = lhs.partialPivLu().solve(rhs);
342  j--;
343  }
344  else
345  {
346  v.coeffRef(j) = -v.segment(st,sz).transpose().cwiseProduct(beta*mS.block(j,st,1,sz) - alpha*mT.block(j,st,1,sz)).sum() / (beta*mS.coeffRef(j,j) - alpha*mT.coeffRef(j,j));
347  }
348  }
349  }
350  m_eivec.col(i).real().noalias() = m_realQZ.matrixZ().transpose() * v;
351  m_eivec.col(i).real().normalize();
352  m_eivec.col(i).imag().setConstant(0);
353  }
354  ++i;
355  }
356  else
357  {
358  // We need to extract the generalized eigenvalues of the pair of a general 2x2 block S and a positive diagonal 2x2 block T
359  // Then taking beta=T_00*T_11, we can avoid any division, and alpha is the eigenvalues of A = (U^-1 * S * U) * diag(T_11,T_00):
360 
361  // T = [a 0]
362  // [0 b]
363  RealScalar a = mT.diagonal().coeff(i),
364  b = mT.diagonal().coeff(i+1);
365  const RealScalar beta = m_betas.coeffRef(i) = m_betas.coeffRef(i+1) = a*b;
366 
367  // ^^ NOTE: using diagonal()(i) instead of coeff(i,i) workarounds a MSVC bug.
368  Matrix<RealScalar,2,2> S2 = mS.template block<2,2>(i,i) * Matrix<Scalar,2,1>(b,a).asDiagonal();
369 
370  Scalar p = Scalar(0.5) * (S2.coeff(0,0) - S2.coeff(1,1));
371  Scalar z = sqrt(abs(p * p + S2.coeff(1,0) * S2.coeff(0,1)));
372  const ComplexScalar alpha = ComplexScalar(S2.coeff(1,1) + p, (beta > 0) ? z : -z);
373  m_alphas.coeffRef(i) = conj(alpha);
374  m_alphas.coeffRef(i+1) = alpha;
375 
376  if (computeEigenvectors) {
377  // Compute eigenvector in position (i+1) and then position (i) is just the conjugate
378  cv.setZero();
379  cv.coeffRef(i+1) = Scalar(1.0);
380  // here, the "static_cast" workaound expression template issues.
381  cv.coeffRef(i) = -(static_cast<Scalar>(beta*mS.coeffRef(i,i+1)) - alpha*mT.coeffRef(i,i+1))
382  / (static_cast<Scalar>(beta*mS.coeffRef(i,i)) - alpha*mT.coeffRef(i,i));
383  for (Index j = i-1; j >= 0; j--)
384  {
385  const Index st = j+1;
386  const Index sz = i+1-j;
387  if (j > 0 && mS.coeff(j, j-1) != Scalar(0))
388  {
389  // 2x2 block
390  Matrix<ComplexScalar, 2, 1> rhs = (alpha*mT.template block<2,Dynamic>(j-1,st,2,sz) - beta*mS.template block<2,Dynamic>(j-1,st,2,sz)) .lazyProduct( cv.segment(st,sz) );
391  Matrix<ComplexScalar, 2, 2> lhs = beta * mS.template block<2,2>(j-1,j-1) - alpha * mT.template block<2,2>(j-1,j-1);
392  cv.template segment<2>(j-1) = lhs.partialPivLu().solve(rhs);
393  j--;
394  } else {
395  cv.coeffRef(j) = cv.segment(st,sz).transpose().cwiseProduct(beta*mS.block(j,st,1,sz) - alpha*mT.block(j,st,1,sz)).sum()
396  / (alpha*mT.coeffRef(j,j) - static_cast<Scalar>(beta*mS.coeffRef(j,j)));
397  }
398  }
399  m_eivec.col(i+1).noalias() = (m_realQZ.matrixZ().transpose() * cv);
400  m_eivec.col(i+1).normalize();
401  m_eivec.col(i) = m_eivec.col(i+1).conjugate();
402  }
403  i += 2;
404  }
405  }
406  }
407  m_computeEigenvectors = computeEigenvectors;
408  m_isInitialized = true;
409  return *this;
410 }
const AbsReturnType abs() const
const SqrtReturnType sqrt() const
Array< int, Dynamic, 1 > v
Array< int, 3, 1 > b
m block< 2, Dynamic >(1, 1, 2, 3).setZero()
float * p
Matrix< float, 1, Dynamic > MatrixType
std::complex< RealScalar > ComplexScalar
Complex scalar type for MatrixType.
Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > ComplexVectorType
Type for vector of complex scalar values eigenvalues as returned by alphas().
MatrixType::Scalar Scalar
Scalar type for matrices of type MatrixType.
NumTraits< Scalar >::Real RealScalar
Derived & setConstant(Index size, const Scalar &val)
const Scalar * data() const
constexpr void resize(Index rows, Index cols)
constexpr Scalar & coeffRef(Index rowId, Index colId)
RealQZ & compute(const MatrixType &A, const MatrixType &B, bool computeQZ=true)
Computes QZ decomposition of given matrix.
Definition: RealQZ.h:561
ComputationInfo info() const
Reports whether previous computation was successful.
Definition: RealQZ.h:171
const MatrixType & matrixZ() const
Returns matrix Z in the QZ decomposition.
Definition: RealQZ.h:134
const MatrixType & matrixT() const
Returns matrix S in the QZ decomposition.
Definition: RealQZ.h:153
const MatrixType & matrixS() const
Returns matrix S in the QZ decomposition.
Definition: RealQZ.h:144
bfloat16() min(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:684
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_conjugate_op< typename Derived::Scalar >, const Derived > conj(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_real_op< typename Derived::Scalar >, const Derived > real(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_abs_op< typename Derived::Scalar >, const Derived > abs(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)
std::ptrdiff_t j

◆ eigenvalues()

template<typename MatrixType_ >
EigenvalueType Eigen::GeneralizedEigenSolver< MatrixType_ >::eigenvalues ( ) const
inline

Returns an expression of the computed generalized eigenvalues.

Returns
An expression of the column vector containing the eigenvalues.

It is a shortcut for

this->alphas().cwiseQuotient(this->betas());
const VectorType & betas() const
const ComplexVectorType & alphas() const

Not that betas might contain zeros. It is therefore not recommended to use this function, but rather directly deal with the alphas and betas vectors.

Precondition
Either the constructor GeneralizedEigenSolver(const MatrixType&,const MatrixType&,bool) or the member function compute(const MatrixType&,const MatrixType&,bool) has been called before.

The eigenvalues are repeated according to their algebraic multiplicity, so there are as many eigenvalues as rows in the matrix. The eigenvalues are not sorted in any particular order.

See also
alphas(), betas(), eigenvectors()

Definition at line 205 of file GeneralizedEigenSolver.h.

206  {
207  eigen_assert(info() == Success && "GeneralizedEigenSolver failed to compute eigenvalues.");
209  }
CwiseBinaryOp< internal::scalar_quotient_op< ComplexScalar, Scalar >, ComplexVectorType, VectorType > EigenvalueType
Expression type for the eigenvalues as returned by eigenvalues().

◆ eigenvectors()

template<typename MatrixType_ >
EigenvectorsType Eigen::GeneralizedEigenSolver< MatrixType_ >::eigenvectors ( ) const
inline

Definition at line 181 of file GeneralizedEigenSolver.h.

181  {
182  eigen_assert(info() == Success && "GeneralizedEigenSolver failed to compute eigenvectors");
183  eigen_assert(m_computeEigenvectors && "Eigenvectors for GeneralizedEigenSolver were not calculated");
184  return m_eivec;
185  }

◆ info()

template<typename MatrixType_ >
ComputationInfo Eigen::GeneralizedEigenSolver< MatrixType_ >::info ( ) const
inline

Definition at line 258 of file GeneralizedEigenSolver.h.

259  {
260  eigen_assert(m_isInitialized && "EigenSolver is not initialized.");
261  return m_realQZ.info();
262  }

◆ setMaxIterations()

template<typename MatrixType_ >
GeneralizedEigenSolver& Eigen::GeneralizedEigenSolver< MatrixType_ >::setMaxIterations ( Index  maxIters)
inline

Sets the maximal number of iterations allowed.

Definition at line 266 of file GeneralizedEigenSolver.h.

267  {
268  m_realQZ.setMaxIterations(maxIters);
269  return *this;
270  }
RealQZ & setMaxIterations(Index maxIters)
Definition: RealQZ.h:188

Member Data Documentation

◆ m_alphas

template<typename MatrixType_ >
ComplexVectorType Eigen::GeneralizedEigenSolver< MatrixType_ >::m_alphas
protected

Definition at line 278 of file GeneralizedEigenSolver.h.

◆ m_betas

template<typename MatrixType_ >
VectorType Eigen::GeneralizedEigenSolver< MatrixType_ >::m_betas
protected

Definition at line 279 of file GeneralizedEigenSolver.h.

◆ m_computeEigenvectors

template<typename MatrixType_ >
bool Eigen::GeneralizedEigenSolver< MatrixType_ >::m_computeEigenvectors
protected

Definition at line 280 of file GeneralizedEigenSolver.h.

◆ m_eivec

template<typename MatrixType_ >
EigenvectorsType Eigen::GeneralizedEigenSolver< MatrixType_ >::m_eivec
protected

Definition at line 277 of file GeneralizedEigenSolver.h.

◆ m_isInitialized

template<typename MatrixType_ >
bool Eigen::GeneralizedEigenSolver< MatrixType_ >::m_isInitialized
protected

Definition at line 281 of file GeneralizedEigenSolver.h.

◆ m_realQZ

template<typename MatrixType_ >
RealQZ<MatrixType> Eigen::GeneralizedEigenSolver< MatrixType_ >::m_realQZ
protected

Definition at line 282 of file GeneralizedEigenSolver.h.

◆ m_tmp

template<typename MatrixType_ >
ComplexVectorType Eigen::GeneralizedEigenSolver< MatrixType_ >::m_tmp
protected

Definition at line 283 of file GeneralizedEigenSolver.h.


The documentation for this class was generated from the following file: