Go to the documentation of this file.
11 #ifndef EIGEN_HOUSEHOLDER_SEQUENCE_H
12 #define EIGEN_HOUSEHOLDER_SEQUENCE_H
59 template<
typename VectorsType,
typename CoeffsType,
int S
ide>
68 ColsAtCompileTime = RowsAtCompileTime,
71 MaxColsAtCompileTime = MaxRowsAtCompileTime,
78 template<
typename VectorsType,
typename CoeffsType,
int S
ide>
85 template<
typename VectorsType,
typename CoeffsType,
int S
ide>
92 Index start = k+1+
h.m_shift;
97 template<
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();
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>
494 bool reverseFlag()
const {
return m_reverse; }
512 template<
typename OtherDerived,
typename VectorsType,
typename CoeffsType,
int S
ide>
517 h.applyThisOnTheRight(
res);
525 template<
typename VectorsType,
typename CoeffsType>
537 template<
typename VectorsType,
typename CoeffsType>
545 #endif // EIGEN_HOUSEHOLDER_SEQUENCE_H
HouseholderSequence< VectorsType, CoeffsType, OnTheRight > HouseholderSequenceType
HouseholderSequence< VectorsType, CoeffsType, OnTheRight > rightHouseholderSequence(const VectorsType &v, const CoeffsType &h)
Convenience function for constructing a Householder sequence.
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC HouseholderSequence(const VectorsType &v, const CoeffsType &h)
Constructor.
Namespace containing all symbols from the Eigen library.
Expression of a fixed-size or dynamic-size block.
CoeffsType::Nested m_coeffs
internal::traits< HouseholderSequence >::Scalar Scalar
ScalarBinaryOpTraits< OtherScalarType, typename MatrixType::Scalar >::ReturnType ResultScalar
ConjugateReturnType conjugate() const
Complex conjugate of the Householder sequence.
EIGEN_DEVICE_FUNC HouseholderSequence & setLength(Index length)
Sets the length of the Householder sequence.
EIGEN_DEVICE_FUNC internal::conditional< Cond, ConjugateReturnType, ConstHouseholderSequence >::type conjugateIf() const
Transpose< Block< const VectorsType, 1, Dynamic > > EssentialVectorType
VectorsType::StorageKind StorageKind
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
HouseholderSequence & setReverseFlag(bool reverse)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DEVICE_FUNC HouseholderSequence & setShift(Index shift)
Sets the shift of the Householder sequence.
const EIGEN_DEVICE_FUNC Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Expression of the transpose of a matrix.
HouseholderSequence< VectorsType, CoeffsType, OnTheLeft > HouseholderSequenceType
HouseholderSequence< typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename VectorsType::ConjugateReturnType >::type, VectorsType >::type, CoeffsType, Side > TransposeReturnType
VectorsType::StorageIndex StorageIndex
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Number of columns of transformation viewed as a matrix.
const EIGEN_DEVICE_FUNC EssentialVectorType essentialVector(Index k) const
Essential part of a Householder vector.
Matrix< ResultScalar, MatrixType::RowsAtCompileTime, MatrixType::ColsAtCompileTime, 0, MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime > Type
HouseholderSequence< typename internal::add_const< VectorsType >::type, typename internal::add_const< CoeffsType >::type, Side > ConstHouseholderSequence
void applyThisOnTheLeft(Dest &dst, Workspace &workspace, bool inputIsIdentity=false) const
AdjointReturnType inverse() const
Inverse of the Householder sequence (equals the adjoint).
AdjointReturnType adjoint() const
Adjoint (conjugate transpose) of the Householder sequence.
static const EssentialVectorType essentialVector(const HouseholderSequenceType &h, Index k)
EIGEN_DEVICE_FUNC void evalTo(DestType &dst) const
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.
TransposeReturnType transpose() const
Transpose of the Householder sequence.
void apply_block_householder_on_the_left(MatrixType &mat, const VectorsType &vectors, const CoeffsType &hCoeffs, bool forward)
void applyThisOnTheLeft(Dest &dst, bool inputIsIdentity=false) const
EIGEN_DEVICE_FUNC void evalTo(Dest &dst, Workspace &workspace) const
HouseholderSequence< VectorsType, CoeffsType > householderSequence(const VectorsType &v, const CoeffsType &h)
Convenience function for constructing a Householder sequence.
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Number of rows of transformation viewed as a matrix.
EIGEN_DEVICE_FUNC bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< possibly_same_dense< T1, T2 >::value >::type *=0)
void applyThisOnTheRight(Dest &dst, Workspace &workspace) const
Array< int, Dynamic, 1 > v
HouseholderSequence< VectorsType, typename internal::conditional< NumTraits< Scalar >::IsComplex, typename internal::remove_all< typename CoeffsType::ConjugateReturnType >::type, CoeffsType >::type, Side > AdjointReturnType
The matrix class, also used for vectors and row-vectors.
EIGEN_DEVICE_FUNC HouseholderSequence(const HouseholderSequence &other)
Copy constructor.
void reverse(const MatrixType &m)
Base class for all dense matrices, vectors, and expressions.
static const EIGEN_DEVICE_FUNC EssentialVectorType essentialVector(const HouseholderSequenceType &h, Index k)
internal::hseq_side_dependent_impl< VectorsType, CoeffsType, Side >::EssentialVectorType EssentialVectorType
static const EIGEN_DEPRECATED end_t end
void applyThisOnTheRight(Dest &dst) const
Block< const VectorsType, Dynamic, 1 > EssentialVectorType
VectorsType::Scalar Scalar
VectorsType::Nested m_vectors
EIGEN_DEVICE_FUNC NewType cast(const OldType &x)
HouseholderSequenceShape Shape
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
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Sequence of Householder reflections acting on subspaces with decreasing size.
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:43