mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix HouseholderSequence::conjugate() and ::adjoint() and add respective unit tests.
This commit is contained in:
@@ -16,6 +16,7 @@ template<typename MatrixType> void upperbidiag(const MatrixType& m)
|
||||
const typename MatrixType::Index cols = m.cols();
|
||||
|
||||
typedef Matrix<typename MatrixType::RealScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime> RealMatrixType;
|
||||
typedef Matrix<typename MatrixType::Scalar, MatrixType::ColsAtCompileTime, MatrixType::RowsAtCompileTime> TransposeMatrixType;
|
||||
|
||||
MatrixType a = MatrixType::Random(rows,cols);
|
||||
internal::UpperBidiagonalization<MatrixType> ubd(a);
|
||||
@@ -24,6 +25,8 @@ template<typename MatrixType> void upperbidiag(const MatrixType& m)
|
||||
b.block(0,0,cols,cols) = ubd.bidiagonal();
|
||||
MatrixType c = ubd.householderU() * b * ubd.householderV().adjoint();
|
||||
VERIFY_IS_APPROX(a,c);
|
||||
TransposeMatrixType d = ubd.householderV() * b.adjoint() * ubd.householderU().adjoint();
|
||||
VERIFY_IS_APPROX(a.adjoint(),d);
|
||||
}
|
||||
|
||||
void test_upperbidiagonalization()
|
||||
|
||||
Reference in New Issue
Block a user