Sequence of Householder reflections acting on subspaces with decreasing size.
More...
|
enum | {
RowsAtCompileTime
,
ColsAtCompileTime
,
MaxRowsAtCompileTime
,
MaxColsAtCompileTime
} |
|
typedef HouseholderSequence< VectorsType, std::conditional_t< NumTraits< Scalar >::IsComplex, internal::remove_all_t< typename CoeffsType::ConjugateReturnType >, CoeffsType >, Side > | AdjointReturnType |
|
typedef HouseholderSequence< std::conditional_t< NumTraits< Scalar >::IsComplex, internal::remove_all_t< typename VectorsType::ConjugateReturnType >, VectorsType >, std::conditional_t< NumTraits< Scalar >::IsComplex, internal::remove_all_t< typename CoeffsType::ConjugateReturnType >, CoeffsType >, Side > | ConjugateReturnType |
|
typedef HouseholderSequence< std::add_const_t< VectorsType >, std::add_const_t< CoeffsType >, Side > | ConstHouseholderSequence |
|
typedef internal::traits< HouseholderSequence >::Scalar | Scalar |
|
typedef HouseholderSequence< std::conditional_t< NumTraits< Scalar >::IsComplex, internal::remove_all_t< typename VectorsType::ConjugateReturnType >, VectorsType >, CoeffsType, Side > | TransposeReturnType |
|
typedef Eigen::Index | Index |
| The interface type of indices. More...
|
|
typedef internal::traits< HouseholderSequence< VectorsType, CoeffsType, Side > >::StorageKind | StorageKind |
|
|
AdjointReturnType | adjoint () const |
| Adjoint (conjugate transpose) of the Householder sequence. More...
|
|
template<typename Dest > |
void | applyThisOnTheLeft (Dest &dst, bool inputIsIdentity=false) const |
|
template<typename Dest , typename Workspace > |
void | applyThisOnTheLeft (Dest &dst, Workspace &workspace, bool inputIsIdentity=false) const |
|
template<typename Dest > |
void | applyThisOnTheRight (Dest &dst) const |
|
template<typename Dest , typename Workspace > |
void | applyThisOnTheRight (Dest &dst, Workspace &workspace) const |
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
| Number of columns of transformation viewed as a matrix. More...
|
|
ConjugateReturnType | conjugate () const |
| Complex conjugate of the Householder sequence. More...
|
|
template<bool Cond> |
std::conditional_t< Cond, ConjugateReturnType, ConstHouseholderSequence > | conjugateIf () const |
|
const EssentialVectorType | essentialVector (Index k) const |
| Essential part of a Householder vector. More...
|
|
template<typename Dest , typename Workspace > |
void | evalTo (Dest &dst, Workspace &workspace) const |
|
template<typename DestType > |
void | evalTo (DestType &dst) const |
|
| HouseholderSequence (const HouseholderSequence &other) |
| Copy constructor. More...
|
|
| HouseholderSequence (const VectorsType &v, const CoeffsType &h) |
| Constructor. More...
|
|
AdjointReturnType | inverse () const |
| Inverse of the Householder sequence (equals the adjoint). More...
|
|
Index | length () const |
| Returns the length of the Householder sequence. More...
|
|
template<typename OtherDerived > |
internal::matrix_type_times_scalar_type< Scalar, OtherDerived >::Type | operator* (const MatrixBase< OtherDerived > &other) const |
| Computes the product of a Householder sequence with a matrix. More...
|
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
| Number of rows of transformation viewed as a matrix. More...
|
|
HouseholderSequence & | setLength (Index length) |
| Sets the length of the Householder sequence. More...
|
|
HouseholderSequence & | setShift (Index shift) |
| Sets the shift of the Householder sequence. More...
|
|
Index | shift () const |
| Returns the shift of the Householder sequence. More...
|
|
TransposeReturnType | transpose () const |
| Transpose of the Householder sequence. More...
|
|
void | addTo (Dest &dst) const |
|
void | applyThisOnTheLeft (Dest &dst) const |
|
void | applyThisOnTheRight (Dest &dst) const |
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
HouseholderSequence< VectorsType, CoeffsType, Side > & | const_cast_derived () const |
|
const HouseholderSequence< VectorsType, CoeffsType, Side > & | const_derived () const |
|
HouseholderSequence< VectorsType, CoeffsType, Side > & | derived () |
|
const HouseholderSequence< VectorsType, CoeffsType, Side > & | derived () const |
|
void | evalTo (Dest &dst) const |
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
|
void | subTo (Dest &dst) const |
|
template<typename VectorsType, typename CoeffsType, int Side>
class Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >
Sequence of Householder reflections acting on subspaces with decreasing size.
This is defined in the Householder module.
- Template Parameters
-
VectorsType | type of matrix containing the Householder vectors |
CoeffsType | type of vector containing the Householder coefficients |
Side | either OnTheLeft (the default) or OnTheRight |
This class represents a product sequence of Householder reflections where the first Householder reflection acts on the whole space, the second Householder reflection leaves the one-dimensional subspace spanned by the first unit vector invariant, the third Householder reflection leaves the two-dimensional subspace spanned by the first two unit vectors invariant, and so on up to the last reflection which leaves all but one dimensions invariant and acts only on the last dimension. Such sequences of Householder reflections are used in several algorithms to zero out certain parts of a matrix. Indeed, the methods HessenbergDecomposition::matrixQ(), Tridiagonalization::matrixQ(), HouseholderQR::householderQ(), and ColPivHouseholderQR::householderQ() all return a HouseholderSequence.
More precisely, the class HouseholderSequence represents an \( n \times n \) matrix \( H \) of the form \( H = \prod_{i=0}^{n-1} H_i \) where the i-th Householder reflection is \( H_i = I - h_i v_i v_i^* \). The i-th Householder coefficient \( h_i \) is a scalar and the i-th Householder vector \( v_i \) is a vector of the form
\[ v_i = [\underbrace{0, \ldots, 0}_{i-1\mbox{ zeros}}, 1, \underbrace{*, \ldots,*}_{n-i\mbox{ arbitrary entries}} ]. \]
The last \( n-i \) entries of \( v_i \) are called the essential part of the Householder vector.
Typical usages are listed below, where H is a HouseholderSequence:
A.applyOnTheRight(
H.adjoint());
A.applyOnTheLeft(
H.adjoint());
Matrix< double, Dynamic, Dynamic > MatrixXd
Dynamic×Dynamic matrix of type double.
In addition to the adjoint, you can also apply the inverse (=adjoint), the transpose, and the conjugate operators.
See the documentation for HouseholderSequence(const VectorsType&, const CoeffsType&) for an example.
- See also
- MatrixBase::applyOnTheLeft(), MatrixBase::applyOnTheRight()
Definition at line 121 of file HouseholderSequence.h.
template<typename VectorsType , typename CoeffsType , int Side>
Essential part of a Householder vector.
- Parameters
-
[in] | k | Index of Householder reflection |
- Returns
- Vector containing non-trivial entries of k-th Householder vector
This function returns the essential part of the Householder vector \( v_i \). This is a vector of length \( n-i \) containing the last \( n-i \) entries of the vector
\[ v_i = [\underbrace{0, \ldots, 0}_{i-1\mbox{ zeros}}, 1, \underbrace{*, \ldots,*}_{n-i\mbox{ arbitrary entries}} ]. \]
The index \( i \) equals k
+ shift(), corresponding to the k-th column of the matrix v
passed to the constructor.
- See also
- setShift(), shift()
Definition at line 231 of file HouseholderSequence.h.
234 return internal::hseq_side_dependent_impl<VectorsType,CoeffsType,Side>::essentialVector(*
this, k);