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:
Benoit Jacob
2010-01-15 00:35:26 -05:00
parent ddc32adb0e
commit bfe6fdde24
2 changed files with 24 additions and 8 deletions

View File

@@ -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);
}