11 #ifndef EIGEN_HOUSEHOLDER_SEQUENCE_H
12 #define EIGEN_HOUSEHOLDER_SEQUENCE_H
59 template<
typename VectorsType,
typename CoeffsType,
int S
ide>
62 typedef typename VectorsType::Scalar
Scalar;
68 ColsAtCompileTime = RowsAtCompileTime,
71 MaxColsAtCompileTime = MaxRowsAtCompileTime,
78 template<
typename VectorsType,
typename CoeffsType,
int S
ide>
85 template<
typename VectorsType,
typename CoeffsType,
int S
ide>
97 template<
typename VectorsType,
typename CoeffsType>
113 typedef Matrix<
ResultScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime,
114 0, MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime>
Type;
120 :
public EigenBase<HouseholderSequence<VectorsType,CoeffsType,Side> >
262 return ReturnType(
m_vectors.template conjugateIf<Cond>(),
m_coeffs.template conjugateIf<Cond>());
278 template<
typename DestType>
288 template<
typename Dest,
typename Workspace>
290 void evalTo(Dest& dst, Workspace& workspace)
const
292 workspace.resize(
rows());
297 dst.diagonal().setOnes();
298 dst.template triangularView<StrictlyUpper>().setZero();
299 for(
Index k = vecs-1; k >= 0; --k)
303 dst.bottomRightCorner(cornerSize, cornerSize)
306 dst.bottomRightCorner(cornerSize, cornerSize)
310 dst.col(k).tail(
rows()-k-1).setZero();
314 dst.col(k).tail(
rows()-k-1).setZero();
327 for(
Index k = vecs-1; k >= 0; --k)
331 dst.bottomRightCorner(cornerSize, cornerSize)
334 dst.bottomRightCorner(cornerSize, cornerSize)
348 template<
typename Dest,
typename Workspace>
351 workspace.resize(dst.rows());
361 template<
typename Dest>
inline void applyThisOnTheLeft(Dest& dst,
bool inputIsIdentity =
false)
const
368 template<
typename Dest,
typename Workspace>
372 inputIsIdentity =
false;
396 inputIsIdentity ? dstStart : 0,
398 inputIsIdentity ? dstRows : dst.cols());
404 workspace.resize(dst.cols());
409 dst.bottomRightCorner(dstStart, inputIsIdentity ? dstStart : dst.cols())
422 template<
typename OtherDerived>
512 template<
typename OtherDerived,
typename VectorsType,
typename CoeffsType,
int S
ide>
525 template<
typename VectorsType,
typename CoeffsType>
537 template<
typename VectorsType,
typename CoeffsType>
EIGEN_DEVICE_FUNC CastXpr< NewType >::Type cast() const
Definition: CommonCwiseUnaryOps.h:62
#define EIGEN_NOEXCEPT
Definition: Macros.h:1418
#define EIGEN_CONSTEXPR
Definition: Macros.h:787
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
#define eigen_assert(x)
Definition: Macros.h:1037
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:105
Sequence of Householder reflections acting on subspaces with decreasing size.
Definition: HouseholderSequence.h:121
AdjointReturnType inverse() const
Inverse of the Householder sequence (equals the adjoint).
Definition: HouseholderSequence.h:275
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Number of columns of transformation viewed as a matrix.
Definition: HouseholderSequence.h:212
EIGEN_DEVICE_FUNC HouseholderSequence(const VectorsType &v, const CoeffsType &h)
Constructor.
Definition: HouseholderSequence.h:183
Index m_length
Definition: HouseholderSequence.h:499
internal::hseq_side_dependent_impl< VectorsType, CoeffsType, Side >::EssentialVectorType EssentialVectorType
Definition: HouseholderSequence.h:122
EIGEN_DEVICE_FUNC HouseholderSequence(const HouseholderSequence &other)
Copy constructor.
Definition: HouseholderSequence.h:191
internal::traits< HouseholderSequence >::Scalar Scalar
Definition: HouseholderSequence.h:131
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
Definition: HouseholderSequence.h:141
bool m_reverse
Definition: HouseholderSequence.h:498
CoeffsType::Nested m_coeffs
Definition: HouseholderSequence.h:497
EIGEN_DEVICE_FUNC HouseholderSequence & setLength(Index length)
Sets the length of the Householder sequence.
Definition: HouseholderSequence.h:443
void applyThisOnTheRight(Dest &dst) const
Definition: HouseholderSequence.h:341
EIGEN_DEVICE_FUNC HouseholderSequence & setShift(Index shift)
Sets the shift of the Householder sequence.
Definition: HouseholderSequence.h:461
EIGEN_DEVICE_FUNC const EssentialVectorType essentialVector(Index k) const
Essential part of a Householder vector.
Definition: HouseholderSequence.h:229
VectorsType::Nested m_vectors
Definition: HouseholderSequence.h:496
EIGEN_DEVICE_FUNC void evalTo(Dest &dst, Workspace &workspace) const
Definition: HouseholderSequence.h:290
EIGEN_DEVICE_FUNC Index shift() const
Returns the shift of the Householder sequence.
Definition: HouseholderSequence.h:471
HouseholderSequence< typename internal::add_const< VectorsType >::type, typename internal::add_const< CoeffsType >::type, Side > ConstHouseholderSequence
Definition: HouseholderSequence.h:163
HouseholderSequence< typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename VectorsType::ConjugateReturnType >::type, VectorsType >::type, CoeffsType, Side > TransposeReturnType
Definition: HouseholderSequence.h:157
EIGEN_DEVICE_FUNC void evalTo(DestType &dst) const
Definition: HouseholderSequence.h:280
@ ColsAtCompileTime
Definition: HouseholderSequence.h:127
@ MaxColsAtCompileTime
Definition: HouseholderSequence.h:129
@ MaxRowsAtCompileTime
Definition: HouseholderSequence.h:128
@ RowsAtCompileTime
Definition: HouseholderSequence.h:126
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.
Definition: HouseholderSequence.h:423
EIGEN_DEVICE_FUNC Index length() const
Returns the length of the Householder sequence.
Definition: HouseholderSequence.h:468
Index m_shift
Definition: HouseholderSequence.h:500
ConjugateReturnType conjugate() const
Complex conjugate of the Householder sequence.
Definition: HouseholderSequence.h:245
EIGEN_DEVICE_FUNC internal::conditional< Cond, ConjugateReturnType, ConstHouseholderSequence >::type conjugateIf() const
Definition: HouseholderSequence.h:259
@ BlockSize
Definition: HouseholderSequence.h:501
void applyThisOnTheLeft(Dest &dst, bool inputIsIdentity=false) const
Definition: HouseholderSequence.h:361
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Number of rows of transformation viewed as a matrix.
Definition: HouseholderSequence.h:205
bool reverseFlag() const
Definition: HouseholderSequence.h:494
HouseholderSequence & setReverseFlag(bool reverse)
Definition: HouseholderSequence.h:488
TransposeReturnType transpose() const
Transpose of the Householder sequence.
Definition: HouseholderSequence.h:236
AdjointReturnType adjoint() const
Adjoint (conjugate transpose) of the Householder sequence.
Definition: HouseholderSequence.h:266
void applyThisOnTheLeft(Dest &dst, Workspace &workspace, bool inputIsIdentity=false) const
Definition: HouseholderSequence.h:369
void applyThisOnTheRight(Dest &dst, Workspace &workspace) const
Definition: HouseholderSequence.h:349
HouseholderSequence< VectorsType, typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename CoeffsType::ConjugateReturnType >::type, CoeffsType >::type, Side > AdjointReturnType
Definition: HouseholderSequence.h:149
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:145
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: PlainObjectBase.h:143
Expression of the transpose of a matrix.
Definition: Transpose.h:54
@ ColMajor
Definition: Constants.h:319
@ AutoAlign
Definition: Constants.h:323
@ OnTheLeft
Definition: Constants.h:332
@ OnTheRight
Definition: Constants.h:334
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16() max(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:576
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16() min(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:571
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
Definition: XprHelper.h:695
void apply_block_householder_on_the_left(MatrixType &mat, const VectorsType &vectors, const CoeffsType &hCoeffs, bool forward)
Definition: BlockHouseholder.h:86
static EIGEN_DEPRECATED const end_t end
Definition: IndexedViewHelper.h:181
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
HouseholderSequence< VectorsType, CoeffsType > householderSequence(const VectorsType &v, const CoeffsType &h)
Convenience function for constructing a Householder sequence.
Definition: HouseholderSequence.h:526
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition: PermutationMatrix.h:515
HouseholderSequence< VectorsType, CoeffsType, OnTheRight > rightHouseholderSequence(const VectorsType &v, const CoeffsType &h)
Convenience function for constructing a Householder sequence.
Definition: HouseholderSequence.h:538
const int Dynamic
Definition: Constants.h:22
type
The type the bitset is encoded with.
Definition: bitset.hpp:44
Flags
Special flags for archives.
Definition: cereal.hpp:185
Definition: document.h:416
PUGI_IMPL_FN void reverse(I begin, I end)
Definition: pugixml.cpp:7615
Definition: EigenBase.h:30
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition: XprHelper.h:806
Definition: HouseholderSequence.h:76
HouseholderSequenceShape Shape
Definition: HouseholderSequence.h:82
Definition: CoreEvaluators.h:71
Definition: CoreEvaluators.h:80
Transpose< Block< const VectorsType, 1, Dynamic > > EssentialVectorType
Definition: HouseholderSequence.h:100
static const EssentialVectorType essentialVector(const HouseholderSequenceType &h, Index k)
Definition: HouseholderSequence.h:102
HouseholderSequence< VectorsType, CoeffsType, OnTheRight > HouseholderSequenceType
Definition: HouseholderSequence.h:101
Definition: HouseholderSequence.h:87
HouseholderSequence< VectorsType, CoeffsType, OnTheLeft > HouseholderSequenceType
Definition: HouseholderSequence.h:89
Block< const VectorsType, Dynamic, 1 > EssentialVectorType
Definition: HouseholderSequence.h:88
static EIGEN_DEVICE_FUNC const EssentialVectorType essentialVector(const HouseholderSequenceType &h, Index k)
Definition: HouseholderSequence.h:90
Definition: XprHelper.h:679
Definition: HouseholderSequence.h:110
ScalarBinaryOpTraits< OtherScalarType, typename MatrixType::Scalar >::ReturnType ResultScalar
Definition: HouseholderSequence.h:112
Matrix< ResultScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, 0, MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime > Type
Definition: HouseholderSequence.h:114
T type
Definition: Meta.h:126
VectorsType::StorageIndex StorageIndex
Definition: HouseholderSequence.h:63
VectorsType::StorageKind StorageKind
Definition: HouseholderSequence.h:64
VectorsType::Scalar Scalar
Definition: HouseholderSequence.h:62
Definition: ForwardDeclarations.h:17
#define const
Definition: zconf.h:233