11 #ifndef EIGEN_EIGENSOLVER_H 12 #define EIGEN_EIGENSOLVER_H 146 template<
typename InputType>
277 template<
typename InputType>
323 template<
typename MatrixType>
344 template<
typename MatrixType>
357 matV.col(
j) =
m_eivec.col(
j).template cast<ComplexScalar>();
358 matV.col(
j).normalize();
368 matV.col(
j).normalize();
369 matV.col(
j+1).normalize();
376 template<
typename MatrixType>
377 template<
typename InputType>
396 if (computeEigenvectors)
402 while (i < matrix.
cols())
429 z = maxval *
sqrt(
abs(p0 * p0 + t0 * t1));
446 if (computeEigenvectors)
457 template<
typename MatrixType>
485 Scalar lastr(0), lastw(0);
507 m_matT.coeffRef(
i,
n) = -r / (eps * norm);
514 Scalar t = (x * lastr - lastw * r) / denom;
517 m_matT.coeffRef(
i+1,
n) = (-r - w *
t) / x;
519 m_matT.coeffRef(
i+1,
n) = (-lastr - y *
t) / lastw;
524 if ((eps * t) * t >
Scalar(1))
529 else if (q <
Scalar(0) &&
n > 0)
531 Scalar lastra(0), lastsa(0), lastw(0);
597 if ((eps * t) * t >
Scalar(1))
608 eigen_assert(0 &&
"Internal bug in EigenSolver (INF or NaN has not been detected)");
622 #endif // EIGEN_EIGENSOLVER_H
Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime > EigenvectorsType
Type for matrix of eigenvectors as returned by eigenvectors().
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
EigenSolver & compute(const EigenBase< InputType > &matrix, bool computeEigenvectors=true)
Computes eigendecomposition of given matrix.
EigenvectorsType eigenvectors() const
Returns the eigenvectors of given matrix.
EIGEN_DEVICE_FUNC bool() isfinite(const T &x)
EigenSolver(Index size)
Default constructor with memory preallocation.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows() const
const MatrixType & matrixU() const
Returns the orthogonal matrix in the Schur decomposition.
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Index getMaxIterations()
Returns the maximum number of iterations.
ComputationInfo info() const
Reports whether previous computation was successful.
ComputationInfo info() const
const MatrixType & matrixT() const
Returns the quasi-triangular matrix in the Schur decomposition.
RealSchur< MatrixType > m_realSchur
Index getMaxIterations()
Returns the maximum number of iterations.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
EigenSolver(const EigenBase< InputType > &matrix, bool computeEigenvectors=true)
Constructor; computes eigendecomposition of given matrix.
Matrix< Scalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > ColumnVectorType
MatrixType pseudoEigenvalueMatrix() const
Returns the block-diagonal matrix in the pseudo-eigendecomposition.
static const Line3 l(Rot3(), 1, 1)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
NumTraits< Scalar >::Real RealScalar
const MatrixType & pseudoEigenvectors() const
Returns the pseudo-eigenvectors of given matrix.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
mpreal maxval(mp_prec_t prec=mpreal::get_default_prec())
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE)
EIGEN_DEVICE_FUNC const Scalar & q
RealSchur & compute(const EigenBase< InputType > &matrix, bool computeU=true)
Computes Schur decomposition of given matrix.
EigenSolver & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed.
std::complex< RealScalar > ComplexScalar
Complex scalar type for MatrixType.
EIGEN_DEVICE_FUNC Index cols() const
_MatrixType MatrixType
Synonym for the template parameter _MatrixType.
EigenSolver()
Default constructor.
RealSchur & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed.
EIGEN_DEVICE_FUNC Index rows() const
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
void doComputeEigenvectors()
MatrixType::Scalar Scalar
Scalar type for matrices of type MatrixType.
Computes eigenvalues and eigenvectors of general matrices.
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
EigenvalueType m_eivalues
EIGEN_DEVICE_FUNC Derived & derived()
const EigenvalueType & eigenvalues() const
Returns the eigenvalues of given matrix.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
Matrix< ComplexScalar, ColsAtCompileTime, 1, Options &~RowMajor, MaxColsAtCompileTime, 1 > EigenvalueType
Type for vector of eigenvalues as returned by eigenvalues().
static void check_template_parameters()