11 #ifndef EIGEN_EIGENSOLVER_H    12 #define EIGEN_EIGENSOLVER_H    80     typedef typename MatrixType::Scalar 
Scalar;
   146     template<
typename InputType>
   148       : 
m_eivec(matrix.rows(), matrix.cols()),
   153         m_matT(matrix.rows(), matrix.cols()), 
   277     template<
typename InputType>
   323 template<
typename MatrixType>
   330   for (
Index i=0; i<n; ++i)
   344 template<
typename MatrixType>
   352   for (
Index j=0; j<n; ++j)
   357       matV.col(j) = 
m_eivec.col(j).template cast<ComplexScalar>();
   358       matV.col(j).normalize();
   363       for (
Index i=0; i<n; ++i)
   368       matV.col(j).normalize();
   369       matV.col(j+1).normalize();
   376 template<
typename MatrixType>
   377 template<
typename InputType>
   396     if (computeEigenvectors)
   402     while (i < matrix.
cols()) 
   425           Scalar maxval = numext::maxi<Scalar>(
abs(p),numext::maxi<Scalar>(
abs(t0),
abs(t1)));
   429           z = maxval * 
sqrt(
abs(p0 * p0 + t0 * t1));
   446     if (computeEigenvectors)
   457 template<
typename MatrixType>
   466   for (
Index j = 0; j < size; ++j)
   477   for (
Index n = size-1; n >= 0; n--)
   485       Scalar lastr(0), lastw(0);
   489       for (
Index i = n-1; i >= 0; i--)
   505               m_matT.coeffRef(i,n) = -r / w;
   507               m_matT.coeffRef(i,n) = -r / (eps * norm);
   514             Scalar t = (x * lastr - lastw * r) / denom;
   517               m_matT.coeffRef(i+1,n) = (-r - w * t) / x;
   519               m_matT.coeffRef(i+1,n) = (-lastr - y * t) / lastw;
   524           if ((eps * t) * t > 
Scalar(1))
   525             m_matT.col(n).tail(size-i) /= t;
   529     else if (q < 
Scalar(0) && n > 0) 
   531       Scalar lastra(0), lastsa(0), lastw(0);
   548       for (
Index i = n-2; i >= 0; i--)
   584               m_matT.coeffRef(i+1,n-1) = (-ra - w * 
m_matT.coeff(i,n-1) + q * 
m_matT.coeff(i,n)) / x;
   597           if ((eps * t) * t > 
Scalar(1))
   598             m_matT.block(i, n-1, size-i, 2) /= t;
   608       eigen_assert(0 && 
"Internal bug in EigenSolver (INF or NaN has not been detected)"); 
   613   for (
Index j = size-1; j >= 0; j--)
   622 #endif // EIGEN_EIGENSOLVER_H 
MatrixType pseudoEigenvalueMatrix() const
Returns the block-diagonal matrix in the pseudo-eigendecomposition. 
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isfinite(const half &a)
const MatrixType & pseudoEigenvectors() const
Returns the pseudo-eigenvectors of given matrix. 
Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime > EigenvectorsType
Type for matrix of eigenvectors as returned by eigenvectors(). 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows() const
EigenSolver & compute(const EigenBase< InputType > &matrix, bool computeEigenvectors=true)
Computes eigendecomposition of given matrix. 
EIGEN_DEVICE_FUNC RealReturnType real() const
EigenSolver(Index size)
Default constructor with memory preallocation. 
EIGEN_DEVICE_FUNC Index rows() const
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Index getMaxIterations()
Returns the maximum number of iterations. 
RealSchur< MatrixType > m_realSchur
Index getMaxIterations()
Returns the maximum number of iterations. 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
EigenSolver(const EigenBase< InputType > &matrix, bool computeEigenvectors=true)
Constructor; computes eigendecomposition of given matrix. 
Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > ColumnVectorType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const AbsReturnType abs() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
NumTraits< Scalar >::Real RealScalar
ComputationInfo info() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API. 
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
RealSchur & compute(const EigenBase< InputType > &matrix, bool computeU=true)
Computes Schur decomposition of given matrix. 
EigenSolver & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed. 
std::complex< RealScalar > ComplexScalar
Complex scalar type for MatrixType. 
const MatrixType & matrixT() const
Returns the quasi-triangular matrix in the Schur decomposition. 
_MatrixType MatrixType
Synonym for the template parameter _MatrixType. 
EigenvectorsType eigenvectors() const
Returns the eigenvectors of given matrix. 
EigenSolver()
Default constructor. 
const MatrixType & matrixU() const
Returns the orthogonal matrix in the Schur decomposition. 
RealSchur & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed. 
int64_t max(int64_t a, const int b)
EIGEN_DEVICE_FUNC Index cols() const
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
void doComputeEigenvectors()
MatrixType::Scalar Scalar
Scalar type for matrices of type MatrixType. 
const EigenvalueType & eigenvalues() const
Returns the eigenvalues of given matrix. 
Computes eigenvalues and eigenvectors of general matrices. 
ComputationInfo info() const
Reports whether previous computation was successful. 
EigenvalueType m_eivalues
EIGEN_DEVICE_FUNC Derived & derived()
Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > EigenvalueType
Type for vector of eigenvalues as returned by eigenvalues(). 
static void check_template_parameters()