11#ifndef EIGEN_MATRIXBASEEIGENVALUES_H
12#define EIGEN_MATRIXBASEEIGENVALUES_H
15#include "./InternalHeaderCheck.h"
21template <
typename Derived,
bool IsComplex>
22struct eigenvalues_selector {
24 static inline typename MatrixBase<Derived>::EigenvaluesReturnType
const run(
const MatrixBase<Derived>& m) {
25 typedef typename Derived::PlainObject PlainObject;
26 PlainObject m_eval(m);
27 return ComplexEigenSolver<PlainObject>(m_eval,
false).eigenvalues();
31template <
typename Derived>
32struct eigenvalues_selector<Derived, false> {
33 static inline typename MatrixBase<Derived>::EigenvaluesReturnType
const run(
const MatrixBase<Derived>& m) {
34 typedef typename Derived::PlainObject PlainObject;
35 PlainObject m_eval(m);
36 return EigenSolver<PlainObject>(m_eval,
false).eigenvalues();
62template <
typename Derived>
64 return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
81template <
typename MatrixType,
unsigned int UpLo>
84 PlainObject thisAsMatrix(*
this);
110template <
typename Derived>
113 typename Derived::PlainObject m_eval(derived());
116 return sqrt((m_eval * m_eval.adjoint()).eval().template selfadjointView<Lower>().eigenvalues().maxCoeff());
134template <
typename MatrixType,
unsigned int UpLo>
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition MatrixBaseEigenvalues.h:111
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition MatrixBaseEigenvalues.h:63
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Definition SelfAdjointEigenSolver.h:82
const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
Definition SelfAdjointEigenSolver.h:300
Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > EigenvaluesReturnType
Definition SelfAdjointView.h:230
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition MatrixBaseEigenvalues.h:136
NumTraits< Scalar >::Real RealScalar
Definition SelfAdjointView.h:228
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition MatrixBaseEigenvalues.h:83
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)