Go to the documentation of this file.
12 #ifndef EIGEN_COMPLEX_SCHUR_H
13 #define EIGEN_COMPLEX_SCHUR_H
112 template<
typename InputType>
190 template<
typename InputType>
210 template<
typename HessMatrixType,
typename OrthMatrixType>
265 template<typename MatrixType>
280 template<
typename MatrixType>
284 if (iter == 10 || iter == 20)
304 if(numext::norm1(eival1) > numext::norm1(eival2))
305 eival2 = det / eival1;
307 eival1 = det / eival2;
310 if(numext::norm1(eival1-t.
coeff(1,1)) < numext::norm1(eival2-t.
coeff(1,1)))
311 return normt * eival1;
313 return normt * eival2;
317 template<
typename MatrixType>
318 template<
typename InputType>
326 m_matT =
matrix.derived().template cast<ComplexScalar>();
327 if(computeU)
m_matU = ComplexMatrixType::Identity(1,1);
339 template<
typename MatrixType>
340 template<
typename HessMatrixType,
typename OrthMatrixType>
352 template<
typename MatrixType,
bool IsComplex>
353 struct complex_schur_reduce_to_hessenberg
364 template<
typename MatrixType>
378 _this.
m_matU = Q.template cast<ComplexScalar>();
386 template<
typename MatrixType>
418 if(totalIter > maxIters)
break;
436 if(computeU)
m_matU.applyOnTheRight(il, il+1,
rot);
438 for(
Index i=il+1 ; i<iu ; i++)
444 if(computeU)
m_matU.applyOnTheRight(i, i+1,
rot);
448 if(totalIter <= maxIters)
459 #endif // EIGEN_COMPLEX_SCHUR_H
ComplexScalar computeShift(Index iu, Index iter)
const EIGEN_DEVICE_FUNC SqrtReturnType sqrt() const
ComplexSchur & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed.
ComplexSchur & computeFromHessenberg(const HessMatrixType &matrixH, const OrthMatrixType &matrixQ, bool computeU=true)
Compute Schur decomposition from a given Hessenberg matrix.
bool subdiagonalEntryIsNeglegible(Index i)
HessenbergDecomposition & compute(const EigenBase< InputType > &matrix)
Computes Hessenberg decomposition of given matrix.
HouseholderSequenceType matrixQ() const
Reconstructs the orthogonal matrix Q in the decomposition.
const ComplexMatrixType & matrixT() const
Returns the triangular matrix in the Schur decomposition.
MatrixType::Scalar Scalar
Scalar type for matrices of type _MatrixType.
HessenbergDecomposition< MatrixType > m_hess
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
ComplexSchur(const EigenBase< InputType > &matrix, bool computeU=true)
Constructor; computes Schur decomposition of given matrix.
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
void reduceToTriangularForm(bool computeU)
Rotation given by a cosine-sine pair.
MatrixHReturnType matrixH() const
Constructs the Hessenberg matrix H in the decomposition.
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
Index getMaxIterations()
Returns the maximum number of iterations.
ComputationInfo info() const
Reports whether previous computation was successful.
static void run(ComplexSchur< MatrixType > &_this, const MatrixType &matrix, bool computeU)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE AbsReturnType abs() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
ComplexSchur & compute(const EigenBase< InputType > &matrix, bool computeU=true)
Computes Schur decomposition of given matrix.
std::complex< RealScalar > ComplexScalar
Complex scalar type for _MatrixType.
const ComplexMatrixType & matrixU() const
Returns the unitary matrix in the Schur decomposition.
ComplexSchur(Index size=RowsAtCompileTime==Dynamic ? 1 :RowsAtCompileTime)
Default constructor.
void run(Expr &expr, Dev &dev)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar & coeff(Index rowId, Index colId) const
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index cols() const
static void run(ComplexSchur< MatrixType > &_this, const MatrixType &matrix, bool computeU)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rows() const
Matrix< ComplexScalar, RowsAtCompileTime, ColsAtCompileTime, Options, MaxRowsAtCompileTime, MaxColsAtCompileTime > ComplexMatrixType
Type for the matrices in the Schur decomposition.
Performs a complex Schur decomposition of a real or complex square matrix.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
static const int m_maxIterationsPerRow
Maximum number of iterations per row.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:05:40