11 #ifndef EIGEN_MATRIXBASEEIGENVALUES_H 12 #define EIGEN_MATRIXBASEEIGENVALUES_H 18 template<
typename Derived,
bool IsComplex>
19 struct eigenvalues_selector
22 static inline typename MatrixBase<Derived>::EigenvaluesReturnType
const 23 run(
const MatrixBase<Derived>& m)
25 typedef typename Derived::PlainObject PlainObject;
26 PlainObject m_eval(m);
27 return ComplexEigenSolver<PlainObject>(m_eval,
false).eigenvalues();
31 template<
typename Derived>
32 struct eigenvalues_selector<Derived, false>
34 static inline typename MatrixBase<Derived>::EigenvaluesReturnType
const 35 run(
const MatrixBase<Derived>& m)
37 typedef typename Derived::PlainObject PlainObject;
38 PlainObject m_eval(m);
39 return EigenSolver<PlainObject>(m_eval,
false).eigenvalues();
65 template<
typename Derived>
66 inline typename MatrixBase<Derived>::EigenvaluesReturnType
69 typedef typename internal::traits<Derived>::Scalar
Scalar;
70 return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
87 template<
typename MatrixType,
unsigned int UpLo>
91 typedef typename SelfAdjointView<MatrixType, UpLo>::PlainObject PlainObject;
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();
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:66
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Definition: SelfAdjointEigenSolver.h:70
Namespace containing all symbols from the Eigen library.
Definition: Core:287
NumTraits< Scalar >::Real RealScalar
Definition: SelfAdjointView.h:241
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition: MatrixBaseEigenvalues.h:153
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition: MatrixBaseEigenvalues.h:122
Definition: Eigen_Colamd.h:50
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition: MatrixBaseEigenvalues.h:89
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition: MatrixBaseEigenvalues.h:67