Sequence of Householder reflections acting on subspaces with decreasing size. More...
#include <ForwardDeclarations.h>
Public Types | |
enum | { RowsAtCompileTime = internal::traits<HouseholderSequence>::RowsAtCompileTime, ColsAtCompileTime = internal::traits<HouseholderSequence>::ColsAtCompileTime, MaxRowsAtCompileTime = internal::traits<HouseholderSequence>::MaxRowsAtCompileTime, MaxColsAtCompileTime = internal::traits<HouseholderSequence>::MaxColsAtCompileTime } |
typedef HouseholderSequence< VectorsType, typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename CoeffsType::ConjugateReturnType >::type, CoeffsType >::type, Side > | AdjointReturnType |
typedef HouseholderSequence< typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename VectorsType::ConjugateReturnType >::type, VectorsType >::type, typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename CoeffsType::ConjugateReturnType >::type, CoeffsType >::type, Side > | ConjugateReturnType |
typedef HouseholderSequence< typename internal::add_const< VectorsType >::type, typename internal::add_const< CoeffsType >::type, Side > | ConstHouseholderSequence |
typedef internal::traits< HouseholderSequence >::Scalar | Scalar |
typedef HouseholderSequence< typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename VectorsType::ConjugateReturnType >::type, VectorsType >::type, CoeffsType, Side > | TransposeReturnType |
Public Types inherited from Eigen::EigenBase< HouseholderSequence< VectorsType, CoeffsType, Side > > | |
typedef Eigen::Index | Index |
The interface type of indices. More... | |
typedef internal::traits< HouseholderSequence< VectorsType, CoeffsType, Side > >::StorageKind | StorageKind |
Public Member Functions | |
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_DEVICE_FUNC 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> | |
EIGEN_DEVICE_FUNC internal::conditional< Cond, ConjugateReturnType, ConstHouseholderSequence >::type | conjugateIf () const |
EIGEN_DEVICE_FUNC const EssentialVectorType | essentialVector (Index k) const |
Essential part of a Householder vector. More... | |
template<typename DestType > | |
EIGEN_DEVICE_FUNC void | evalTo (DestType &dst) const |
template<typename Dest , typename Workspace > | |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst, Workspace &workspace) const |
EIGEN_DEVICE_FUNC | HouseholderSequence (const VectorsType &v, const CoeffsType &h) |
Constructor. More... | |
EIGEN_DEVICE_FUNC | HouseholderSequence (const HouseholderSequence &other) |
Copy constructor. More... | |
AdjointReturnType | inverse () const |
Inverse of the Householder sequence (equals the adjoint). More... | |
EIGEN_DEVICE_FUNC 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_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
Number of rows of transformation viewed as a matrix. More... | |
EIGEN_DEVICE_FUNC HouseholderSequence & | setLength (Index length) |
Sets the length of the Householder sequence. More... | |
EIGEN_DEVICE_FUNC HouseholderSequence & | setShift (Index shift) |
Sets the shift of the Householder sequence. More... | |
EIGEN_DEVICE_FUNC Index | shift () const |
Returns the shift of the Householder sequence. More... | |
TransposeReturnType | transpose () const |
Transpose of the Householder sequence. More... | |
Public Member Functions inherited from Eigen::EigenBase< HouseholderSequence< VectorsType, CoeffsType, Side > > | |
EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (Dest &dst) const |
EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC HouseholderSequence< VectorsType, CoeffsType, Side > & | const_cast_derived () const |
EIGEN_DEVICE_FUNC const HouseholderSequence< VectorsType, CoeffsType, Side > & | const_derived () const |
EIGEN_DEVICE_FUNC HouseholderSequence< VectorsType, CoeffsType, Side > & | derived () |
EIGEN_DEVICE_FUNC const HouseholderSequence< VectorsType, CoeffsType, Side > & | derived () const |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
Protected Types | |
enum | { BlockSize = 48 } |
Protected Member Functions | |
bool | reverseFlag () const |
HouseholderSequence & | setReverseFlag (bool reverse) |
Protected Attributes | |
CoeffsType::Nested | m_coeffs |
Index | m_length |
bool | m_reverse |
Index | m_shift |
VectorsType::Nested | m_vectors |
Private Types | |
typedef internal::hseq_side_dependent_impl< VectorsType, CoeffsType, Side >::EssentialVectorType | EssentialVectorType |
Friends | |
template<typename VectorsType2 , typename CoeffsType2 , int Side2> | |
class | HouseholderSequence |
template<typename _VectorsType , typename _CoeffsType , int _Side> | |
struct | internal::hseq_side_dependent_impl |
Sequence of Householder reflections acting on subspaces with decreasing size.
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 matrix of the form where the i-th Householder reflection is . The i-th Householder coefficient is a scalar and the i-th Householder vector is a vector of the form
The last entries of are called the essential part of the Householder vector.
Typical usages are listed below, where H is a HouseholderSequence:
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.
Definition at line 282 of file ForwardDeclarations.h.
typedef HouseholderSequence< VectorsType, typename internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::remove_all<typename CoeffsType::ConjugateReturnType>::type, CoeffsType>::type, Side > Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >::AdjointReturnType |
Definition at line 149 of file HouseholderSequence.h.
typedef HouseholderSequence< typename internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::remove_all<typename VectorsType::ConjugateReturnType>::type, VectorsType>::type, typename internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::remove_all<typename CoeffsType::ConjugateReturnType>::type, CoeffsType>::type, Side > Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >::ConjugateReturnType |
Definition at line 141 of file HouseholderSequence.h.
typedef HouseholderSequence< typename internal::add_const<VectorsType>::type, typename internal::add_const<CoeffsType>::type, Side > Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >::ConstHouseholderSequence |
Definition at line 163 of file HouseholderSequence.h.
|
private |
Definition at line 122 of file HouseholderSequence.h.
typedef internal::traits<HouseholderSequence>::Scalar Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >::Scalar |
Definition at line 131 of file HouseholderSequence.h.
typedef HouseholderSequence< typename internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::remove_all<typename VectorsType::ConjugateReturnType>::type, VectorsType>::type, CoeffsType, Side > Eigen::HouseholderSequence< VectorsType, CoeffsType, Side >::TransposeReturnType |
Definition at line 157 of file HouseholderSequence.h.
anonymous enum |
Enumerator | |
---|---|
RowsAtCompileTime | |
ColsAtCompileTime | |
MaxRowsAtCompileTime | |
MaxColsAtCompileTime |
Definition at line 125 of file HouseholderSequence.h.
|
protected |
Enumerator | |
---|---|
BlockSize |
Definition at line 501 of file HouseholderSequence.h.
|
inline |
Constructor.
[in] | v | Matrix containing the essential parts of the Householder vectors |
[in] | h | Vector containing the Householder coefficients |
Constructs the Householder sequence with coefficients given by h
and vectors given by v
. The i-th Householder coefficient is given by h(i)
and the essential part of the i-th Householder vector is given by v(k,i)
with k
> i
(the subdiagonal part of the i-th column). If v
has fewer columns than rows, then the Householder sequence contains as many Householder reflections as there are columns.
v
and h
by reference.Example:
Output:
Definition at line 183 of file HouseholderSequence.h.
|
inline |
Copy constructor.
Definition at line 191 of file HouseholderSequence.h.
|
inline |
Adjoint (conjugate transpose) of the Householder sequence.
Definition at line 266 of file HouseholderSequence.h.
|
inline |
Definition at line 361 of file HouseholderSequence.h.
|
inline |
Definition at line 369 of file HouseholderSequence.h.
|
inline |
Definition at line 341 of file HouseholderSequence.h.
|
inline |
Definition at line 349 of file HouseholderSequence.h.
|
inline |
Number of columns of transformation viewed as a matrix.
This equals the dimension of the space that the transformation acts on.
Definition at line 212 of file HouseholderSequence.h.
|
inline |
Complex conjugate of the Householder sequence.
Definition at line 245 of file HouseholderSequence.h.
|
inline |
*this
if Cond==true, returns *this
otherwise. Definition at line 259 of file HouseholderSequence.h.
|
inline |
Essential part of a Householder vector.
[in] | k | Index of Householder reflection |
This function returns the essential part of the Householder vector . This is a vector of length containing the last entries of the vector
The index equals k
+ shift(), corresponding to the k-th column of the matrix v
passed to the constructor.
Definition at line 229 of file HouseholderSequence.h.
|
inline |
Definition at line 280 of file HouseholderSequence.h.
|
inline |
Definition at line 290 of file HouseholderSequence.h.
|
inline |
Inverse of the Householder sequence (equals the adjoint).
Definition at line 275 of file HouseholderSequence.h.
|
inline |
Returns the length of the Householder sequence.
Definition at line 468 of file HouseholderSequence.h.
|
inline |
Computes the product of a Householder sequence with a matrix.
[in] | other | Matrix being multiplied. |
This function computes where is the Householder sequence represented by *this
and is the matrix other
.
Definition at line 423 of file HouseholderSequence.h.
|
inlineprotected |
Definition at line 494 of file HouseholderSequence.h.
|
inline |
Number of rows of transformation viewed as a matrix.
This equals the dimension of the space that the transformation acts on.
Definition at line 205 of file HouseholderSequence.h.
|
inline |
Sets the length of the Householder sequence.
[in] | length | New value for the length. |
By default, the length of the Householder sequence is set to the number of columns of the matrix v
passed to the constructor, or the number of rows if that is smaller. After this function is called, the length equals length
.
Definition at line 443 of file HouseholderSequence.h.
|
inlineprotected |
Definition at line 488 of file HouseholderSequence.h.
|
inline |
Sets the shift of the Householder sequence.
[in] | shift | New value for the shift. |
By default, a HouseholderSequence object represents and the i-th column of the matrix v
passed to the constructor corresponds to the i-th Householder reflection. After this function is called, the object represents and the i-th column of v
corresponds to the (shift+i)-th Householder reflection.
Definition at line 461 of file HouseholderSequence.h.
|
inline |
Returns the shift of the Householder sequence.
Definition at line 471 of file HouseholderSequence.h.
|
inline |
Transpose of the Householder sequence.
Definition at line 236 of file HouseholderSequence.h.
|
friend |
Definition at line 474 of file HouseholderSequence.h.
|
friend |
Definition at line 431 of file HouseholderSequence.h.
|
protected |
Definition at line 497 of file HouseholderSequence.h.
|
protected |
Definition at line 499 of file HouseholderSequence.h.
|
protected |
Definition at line 498 of file HouseholderSequence.h.
|
protected |
Definition at line 500 of file HouseholderSequence.h.
|
protected |
Definition at line 496 of file HouseholderSequence.h.