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>
66inline typename MatrixBase<Derived>::EigenvaluesReturnType
69 return internal::eigenvalues_selector<Derived, NumTraits<Scalar>::IsComplex>::run(derived());
86template<
typename MatrixType,
unsigned int UpLo>
90 PlainObject thisAsMatrix(*
this);
118template<
typename Derived>
119inline typename MatrixBase<Derived>::RealScalar
123 typename Derived::PlainObject m_eval(derived());
126 return sqrt((m_eval*m_eval.adjoint())
128 .template selfadjointView<Lower>()
149template<
typename MatrixType,
unsigned int UpLo>
153 return eigenvalues().cwiseAbs().maxCoeff();
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Computes eigenvalues and eigenvectors of selfadjoint matrices.
Definition: SelfAdjointEigenSolver.h:77
const RealVectorType & eigenvalues() const
Returns the eigenvalues of given matrix.
Definition: SelfAdjointEigenSolver.h:300
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:51
NumTraits< Scalar >::Real RealScalar
Definition: SelfAdjointView.h:256
Namespace containing all symbols from the Eigen library.
Definition: Core:141