11 #ifndef EIGEN_MATRIXBASEEIGENVALUES_H
12 #define EIGEN_MATRIXBASEEIGENVALUES_H
14 #include "./InternalHeaderCheck.h"
20 template<
typename Derived,
bool IsComplex>
21 struct eigenvalues_selector
24 static inline typename MatrixBase<Derived>::EigenvaluesReturnType
const
25 run(
const MatrixBase<Derived>& m)
27 typedef typename Derived::PlainObject PlainObject;
28 PlainObject m_eval(m);
29 return ComplexEigenSolver<PlainObject>(m_eval,
false).eigenvalues();
33 template<
typename Derived>
34 struct eigenvalues_selector<Derived, false>
36 static inline typename MatrixBase<Derived>::EigenvaluesReturnType
const
37 run(
const MatrixBase<Derived>& m)
39 typedef typename Derived::PlainObject PlainObject;
40 PlainObject m_eval(m);
41 return EigenSolver<PlainObject>(m_eval,
false).eigenvalues();
67 template<
typename Derived>
68 inline typename MatrixBase<Derived>::EigenvaluesReturnType
71 return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
88 template<
typename MatrixType,
unsigned int UpLo>
92 PlainObject thisAsMatrix(*
this);
120 template<
typename Derived>
121 inline typename MatrixBase<Derived>::RealScalar
125 typename Derived::PlainObject m_eval(derived());
128 return sqrt((m_eval*m_eval.adjoint())
130 .template selfadjointView<Lower>()
151 template<
typename MatrixType,
unsigned int UpLo>
155 return eigenvalues().cwiseAbs().maxCoeff();
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition: MatrixBaseEigenvalues.h:122
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition: MatrixBaseEigenvalues.h:69
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Definition: SelfAdjointEigenSolver.h:79
const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
Definition: SelfAdjointEigenSolver.h:302
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition: MatrixBaseEigenvalues.h:153
NumTraits< Scalar >::Real RealScalar
Definition: SelfAdjointView.h:256
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition: MatrixBaseEigenvalues.h:90
Namespace containing all symbols from the Eigen library.
Definition: Core:139
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)