10 #define EIGEN_RUNTIME_NO_MALLOC 13 #include <Eigen/Eigenvalues> 26 B = MatrixType::Random(dim,dim);
30 Index k=internal::random<Index>(0, dim-1);
31 switch(internal::random<int>(0,10)) {
33 A.row(k).setZero();
break;
35 A.col(k).setZero();
break;
37 B.row(k).setZero();
break;
39 B.col(k).setZero();
break;
52 bool all_zeros =
true;
57 std::cerr <<
"Error: T(" << i <<
"," <<
j <<
") = " << qz.
matrixT()(
i,
j) << std::endl;
62 std::cerr <<
"Error: S(" << i <<
"," <<
j <<
") = " << qz.
matrixS()(
i,
j) << std::endl;
67 std::cerr <<
"Error: S(" << i <<
"," <<
j <<
") = " << qz.
matrixS()(
i,
j) <<
" && S(" << i-1 <<
"," <<
j-1 <<
") = " << qz.
matrixS()(i-1,
j-1) << std::endl;
82 CALL_SUBTEST_1(
real_qz(Matrix4f()) );
84 CALL_SUBTEST_2(
real_qz(MatrixXd(s,s)) );
87 CALL_SUBTEST_2(
real_qz(MatrixXd(1,1)) );
88 CALL_SUBTEST_2(
real_qz(MatrixXd(2,2)) );
90 CALL_SUBTEST_4(
real_qz(Matrix2d()) );
void real_qz(const MatrixType &m)
ComputationInfo info() const
Reports whether previous computation was successful.
const MatrixType & matrixT() const
Returns matrix S in the QZ decomposition.
Matrix< SCALARA, Dynamic, Dynamic > A
Matrix< SCALARB, Dynamic, Dynamic > B
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const MatrixType & matrixS() const
Returns matrix S in the QZ decomposition.
const MatrixType & matrixZ() const
Returns matrix Z in the QZ decomposition.
const mpreal dim(const mpreal &a, const mpreal &b, mp_rnd_t r=mpreal::get_default_rnd())
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
#define EIGEN_TEST_MAX_SIZE
RealQZ & compute(const MatrixType &A, const MatrixType &B, bool computeQZ=true)
Computes QZ decomposition of given matrix.
const MatrixType & matrixQ() const
Returns matrix Q in the QZ decomposition.
The matrix class, also used for vectors and row-vectors.