mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
allow to multiply a householder sequence and a matrix when one is real and one is complex.
This is especially important as in bidiagonalization, the band matrix is real.
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "main.h"
|
||||
#include <Eigen/SVD>
|
||||
#include <Eigen/LU>
|
||||
|
||||
template<typename MatrixType> void upperbidiag(const MatrixType& m)
|
||||
{
|
||||
@@ -39,7 +38,7 @@ template<typename MatrixType> void upperbidiag(const MatrixType& m)
|
||||
RealMatrixType b(rows, cols);
|
||||
b.setZero();
|
||||
b.block(0,0,cols,cols) = ubd.bidiagonal();
|
||||
MatrixType c = ubd.householderU() * b.template cast<Scalar>() * ubd.householderV().adjoint();
|
||||
MatrixType c = ubd.householderU() * b * ubd.householderV().adjoint();
|
||||
VERIFY_IS_APPROX(a,c);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user