3 RealQZ<MatrixXf>
qz(4);
7 cout <<
"A:\n" <<
A <<
"\n" <<
"B:\n" <<
B <<
"\n";
8 cout <<
"S:\n" <<
qz.matrixS() <<
"\n" <<
"T:\n" <<
qz.matrixT() <<
"\n";
9 cout <<
"Q:\n" <<
qz.matrixQ() <<
"\n" <<
"Z:\n" <<
qz.matrixZ() <<
"\n";
13 <<
"\n|A-QSZ|: " << (
A-
qz.matrixQ()*
qz.matrixS()*
qz.matrixZ()).norm()
14 <<
", |B-QTZ|: " << (
B-
qz.matrixQ()*
qz.matrixT()*
qz.matrixZ()).norm()
15 <<
"\n|QQ* - I|: " << (
qz.matrixQ()*
qz.matrixQ().adjoint() - MatrixXf::Identity(4,4)).norm()
16 <<
", |ZZ* - I|: " << (
qz.matrixZ()*
qz.matrixZ().adjoint() - MatrixXf::Identity(4,4)).norm()
Matrix< float, Dynamic, Dynamic > MatrixXf
Dynamic×Dynamic matrix of type float.