11 #ifndef EIGEN_BLOCK_HOUSEHOLDER_H
12 #define EIGEN_BLOCK_HOUSEHOLDER_H
52 template<
typename TriangularFactorType,
typename VectorsType,
typename CoeffsType>
55 const Index nbVecs = vectors.cols();
56 eigen_assert(triFactor.rows() == nbVecs && triFactor.cols() == nbVecs && vectors.rows()>=nbVecs);
60 Index rs = vectors.rows() -
i - 1;
65 triFactor.row(
i).tail(rt).noalias() = -hCoeffs(
i) * vectors.col(
i).tail(rs).adjoint()
66 * vectors.bottomRightCorner(rs, rt).template triangularView<UnitLower>();
72 typename TriangularFactorType::Scalar z = triFactor(
i,
j);
73 triFactor(
i,
j) = z * triFactor(
j,
j);
75 triFactor.row(
i).tail(nbVecs-
j-1) += z * triFactor.row(
j).tail(nbVecs-
j-1);
79 triFactor(
i,
i) = hCoeffs(
i);
87 template<
typename MatrixType,
typename VectorsType,
typename CoeffsType>
90 enum { TFactorSize = VectorsType::ColsAtCompileTime };
91 Index nbVecs = vectors.cols();
99 Matrix<
typename MatrixType::Scalar,VectorsType::ColsAtCompileTime,MatrixType::ColsAtCompileTime,
100 (VectorsType::MaxColsAtCompileTime==1 && MatrixType::MaxColsAtCompileTime!=1)?
RowMajor:
ColMajor,
101 VectorsType::MaxColsAtCompileTime,MatrixType::MaxColsAtCompileTime> tmp =
V.adjoint() *
mat;
103 if(forward) tmp =
T.template triangularView<Upper>() * tmp;
104 else tmp =
T.template triangularView<Upper>().adjoint() * tmp;
105 mat.noalias() -=
V * tmp;
Matrix< float, 1, Dynamic > MatrixType
Eigen::Triplet< double > T
The matrix class, also used for vectors and row-vectors.
Expression of a triangular part in a matrix.
void make_block_householder_triangular_factor(TriangularFactorType &triFactor, const VectorsType &vectors, const CoeffsType &hCoeffs)
void apply_block_householder_on_the_left(MatrixType &mat, const VectorsType &vectors, const CoeffsType &hCoeffs, bool forward)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.