11#ifndef EIGEN_MATRIXBASEEIGENVALUES_H
12#define EIGEN_MATRIXBASEEIGENVALUES_H
18template<
typename Derived,
bool IsComplex>
19struct 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();
31template<
typename Derived>
32struct 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();
65template<
typename Derived>
69 typedef typename internal::traits<Derived>::Scalar Scalar;
70 return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
87template<
typename MatrixType,
unsigned int UpLo>
91 typedef typename SelfAdjointView<MatrixType, UpLo>::PlainObject PlainObject;
92 PlainObject thisAsMatrix(*
this);
120template<
typename Derived>
121inline typename MatrixBase<Derived>::RealScalar
124 typename Derived::PlainObject m_eval(derived());
127 return internal::sqrt((m_eval*m_eval.adjoint())
129 .template selfadjointView<Lower>()
150template<
typename MatrixType,
unsigned int UpLo>
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition MatrixBaseEigenvalues.h:67
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition MatrixBaseEigenvalues.h:122
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Definition SelfAdjointEigenSolver.h:69
const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
Definition SelfAdjointEigenSolver.h:250
RealScalar operatorNorm() const
Computes the L2 operator norm.
Definition MatrixBaseEigenvalues.h:152
EigenvaluesReturnType eigenvalues() const
Computes the eigenvalues of a matrix.
Definition MatrixBaseEigenvalues.h:89
NumTraits< Scalar >::Real RealScalar
Definition SelfAdjointView.h:158
Matrix< RealScalar, internal::traits< MatrixType >::ColsAtCompileTime, 1 > EigenvaluesReturnType
Definition SelfAdjointView.h:160