11#ifndef EIGEN_HOUSEHOLDER_SEQUENCE_H
12#define EIGEN_HOUSEHOLDER_SEQUENCE_H
59template<
typename VectorsType,
typename CoeffsType,
int S
ide>
62 typedef typename VectorsType::Scalar
Scalar;
68 ColsAtCompileTime = RowsAtCompileTime,
71 MaxColsAtCompileTime = MaxRowsAtCompileTime,
78template<
typename VectorsType,
typename CoeffsType,
int S
ide>
85template<
typename VectorsType,
typename CoeffsType,
int S
ide>
92 Index start = k+1+
h.m_shift;
97template<
typename VectorsType,
typename CoeffsType>
104 Index start = k+1+
h.m_shift;
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>
512template<
typename OtherDerived,
typename VectorsType,
typename CoeffsType,
int S
ide>
517 h.applyThisOnTheRight(res);
525template<
typename VectorsType,
typename CoeffsType>
537template<
typename VectorsType,
typename CoeffsType>
EIGEN_DEVICE_FUNC CastXpr< NewType >::Type cast() const
Definition: CommonCwiseUnaryOps.h:62
#define EIGEN_NOEXCEPT
Definition: Macros.h:1428
#define EIGEN_CONSTEXPR
Definition: Macros.h:797
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define eigen_assert(x)
Definition: Macros.h:1047
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:105
\householder_module
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
HouseholderSequence & setReverseFlag(bool reverse)
Definition: HouseholderSequence.h:488
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
@ BlockSize
Definition: HouseholderSequence.h:501
void applyThisOnTheRight(Dest &dst) const
Definition: HouseholderSequence.h:341
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
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
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
@ ColsAtCompileTime
Definition: HouseholderSequence.h:127
@ MaxColsAtCompileTime
Definition: HouseholderSequence.h:129
@ MaxRowsAtCompileTime
Definition: HouseholderSequence.h:128
@ RowsAtCompileTime
Definition: HouseholderSequence.h:126
TransposeReturnType transpose() const
Transpose of the Householder sequence.
Definition: HouseholderSequence.h:236
EIGEN_DEVICE_FUNC HouseholderSequence & setShift(Index shift)
Sets the shift of the Householder sequence.
Definition: HouseholderSequence.h:461
EIGEN_DEVICE_FUNC internal::conditional< Cond, ConjugateReturnType, ConstHouseholderSequence >::type conjugateIf() const
Definition: HouseholderSequence.h:259
EIGEN_DEVICE_FUNC HouseholderSequence & setLength(Index length)
Sets the length of the Householder sequence.
Definition: HouseholderSequence.h:443
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
type
Definition: core.h:575
HouseholderSequence< VectorsType, CoeffsType > householderSequence(const VectorsType &v, const CoeffsType &h)
\
Definition: HouseholderSequence.h:526
HouseholderSequence< VectorsType, CoeffsType, OnTheRight > rightHouseholderSequence(const VectorsType &v, const CoeffsType &h)
\
Definition: HouseholderSequence.h:538
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:319
@ AutoAlign
Align the matrix itself if it is vectorizable fixed-size.
Definition: Constants.h:323
@ OnTheLeft
Apply transformation on the left.
Definition: Constants.h:332
@ OnTheRight
Apply transformation on the right.
Definition: Constants.h:334
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
constexpr common_t< T1, T2 > min(const T1 x, const T2 y) noexcept
Compile-time pairwise minimum function.
Definition: min.hpp:35
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: MatrixExponential.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const Product< SparseDerived, PermDerived, AliasFreeProduct > operator*(const SparseMatrixBase< SparseDerived > &matrix, const PermutationBase< PermDerived > &perm)
Definition: SparsePermutation.h:147
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
Definition: Eigen_Colamd.h:50
static constexpr const unit_t< compound_unit< energy::joule, time::seconds > > h(6.626070040e-34)
Planck constant.
Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor Matrix...
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
Matrix< ResultScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, 0, MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime > Type
Definition: HouseholderSequence.h:114
ScalarBinaryOpTraits< OtherScalarType, typenameMatrixType::Scalar >::ReturnType ResultScalar
Definition: HouseholderSequence.h:112
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