mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Add debug output.
This commit is contained in:
parent
83904a21c1
commit
a3a4714aba
@ -49,11 +49,20 @@ template<typename MatrixType> void real_qz(const MatrixType& m)
|
||||
for (Index i=0; i<A.cols(); i++)
|
||||
for (Index j=0; j<i; j++) {
|
||||
if (abs(qz.matrixT()(i,j))!=Scalar(0.0))
|
||||
{
|
||||
std::cerr << "Error: T(" << i << "," << j << ") = " << qz.matrixT()(i,j) << std::endl;
|
||||
all_zeros = false;
|
||||
}
|
||||
if (j<i-1 && abs(qz.matrixS()(i,j))!=Scalar(0.0))
|
||||
{
|
||||
std::cerr << "Error: S(" << i << "," << j << ") = " << qz.matrixS()(i,j) << std::endl;
|
||||
all_zeros = false;
|
||||
}
|
||||
if (j==i-1 && j>0 && abs(qz.matrixS()(i,j))!=Scalar(0.0) && abs(qz.matrixS()(i-1,j-1))!=Scalar(0.0))
|
||||
{
|
||||
std::cerr << "Error: S(" << i << "," << j << ") = " << qz.matrixS()(i,j) << " && S(" << i-1 << "," << j-1 << ") = " << qz.matrixS()(i-1,j-1) << std::endl;
|
||||
all_zeros = false;
|
||||
}
|
||||
}
|
||||
VERIFY_IS_EQUAL(all_zeros, true);
|
||||
VERIFY_IS_APPROX(qz.matrixQ()*qz.matrixS()*qz.matrixZ(), A);
|
||||
|
Loading…
Reference in New Issue
Block a user