12 #include <Eigen/Eigenvalues> 14 template<
typename MatrixType>
void schur(
int size = MatrixType::ColsAtCompileTime)
20 for(
int counter = 0; counter <
g_repeat; ++counter) {
24 ComplexMatrixType
U = schurOfA.
matrixU();
25 ComplexMatrixType
T = schurOfA.
matrixT();
56 cs3.setMaxIterations(1).compute(A);
61 Atriangular.template triangularView<StrictlyLower>().
setZero();
62 cs3.setMaxIterations(1).compute(Atriangular);
64 VERIFY_IS_EQUAL(cs3.matrixT(), Atriangular.template cast<ComplexScalar>());
65 VERIFY_IS_EQUAL(cs3.matrixU(), ComplexMatrixType::Identity(size, size));
73 if (size > 1 && size < 20)
76 A(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();
#define VERIFY_RAISES_ASSERT(a)
#define CALL_SUBTEST_4(FUNC)
cout<< "Here is a random 4x4 matrix, A:"<< endl<< A<< endl<< endl;ComplexSchur< MatrixXcf > schurOfA(A, false)
ComplexSchur & setMaxIterations(Index maxIters)
Sets the maximum number of iterations allowed.
#define CALL_SUBTEST_3(FUNC)
void schur(int size=MatrixType::ColsAtCompileTime)
EIGEN_DECLARE_TEST(schur_complex)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
ComplexSchur & compute(const EigenBase< InputType > &matrix, bool computeU=true)
Computes Schur decomposition of given matrix.
ComputationInfo info() const
Reports whether previous computation was successful.
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
#define CALL_SUBTEST_1(FUNC)
Eigen::Triplet< double > T
#define CALL_SUBTEST_5(FUNC)
#define EIGEN_TEST_MAX_SIZE
const ComplexMatrixType & matrixU() const
Returns the unitary matrix in the Schur decomposition.
#define CALL_SUBTEST_2(FUNC)
The matrix class, also used for vectors and row-vectors.
Performs a complex Schur decomposition of a real or complex square matrix.
const ComplexMatrixType & matrixT() const
Returns the triangular matrix in the Schur decomposition.