11 #ifndef EIGEN_MATRIXBASEEIGENVALUES_H
12 #define EIGEN_MATRIXBASEEIGENVALUES_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>
120 template<
typename Derived>
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();
const SqrtReturnType sqrt() const
#define EIGEN_DEVICE_FUNC
NumTraits< Scalar >::Real RealScalar
RealScalar operatorNorm() const
Computes the L2 operator norm.
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
The matrix class, also used for vectors and row-vectors.
Computes eigenvalues and eigenvectors of selfadjoint matrices.
const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
RealScalar operatorNorm() const
Computes the L2 operator norm.
MatrixType::PlainObject PlainObject
NumTraits< Scalar >::Real RealScalar
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)