11#ifndef EIGEN_HOUSEHOLDER_H
12#define EIGEN_HOUSEHOLDER_H
17template<
int n>
struct decrement_size
41template<
typename Derived>
64template<
typename Derived>
65template<
typename EssentialPart>
68 EssentialPart& essential,
70 RealScalar& beta)
const
75 EIGEN_STATIC_ASSERT_VECTOR_ONLY(EssentialPart)
78 RealScalar tailSqNorm =
size()==1 ? RealScalar(0) :
tail.squaredNorm();
80 const RealScalar tol = (std::numeric_limits<RealScalar>::min)();
82 if(tailSqNorm <= tol && numext::abs2(numext::imag(c0))<=tol)
85 beta = numext::real(c0);
90 beta =
sqrt(numext::abs2(c0) + tailSqNorm);
91 if (numext::real(c0)>=RealScalar(0))
93 essential =
tail / (c0 - beta);
94 tau =
conj((beta - c0) / beta);
113template<
typename Derived>
114template<
typename EssentialPart>
117 const EssentialPart& essential,
129 tmp.noalias() = essential.adjoint() * bottom;
131 this->
row(0) -= tau * tmp;
132 bottom.noalias() -= tau * essential * tmp;
151template<
typename Derived>
152template<
typename EssentialPart>
155 const EssentialPart& essential,
167 tmp.noalias() = right * essential;
169 this->
col(0) -= tau * tmp;
170 right.noalias() -= tau * tmp * essential.adjoint();
Expression of a fixed-size or dynamic-size block.
Definition Block.h:105
RowXpr row(Index i)
Definition DenseBase.h:1119
ColXpr col(Index i)
Definition DenseBase.h:1098
internal::traits< Derived >::Scalar Scalar
Definition DenseBase.h:66
FixedSegmentReturnType<... >::Type tail(NType n)
Definition DenseBase.h:1258
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition EigenBase.h:63
Derived & derived()
Definition EigenBase.h:46
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition EigenBase.h:60
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition EigenBase.h:67
CoeffReturnType coeff(Index row, Index col) const
Definition DenseCoeffsBase.h:97
A matrix or vector expression mapping an existing array of data.
Definition Map.h:96
void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
Definition Householder.h:67
void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Definition Householder.h:116
void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Definition Householder.h:154
void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
Definition Householder.h:43
Expression of a fixed-size or dynamic-size sub-vector.
Definition VectorBlock.h:60
Namespace containing all symbols from the Eigen library.
Definition Core:141
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sqrt_op< typename Derived::Scalar >, const Derived > sqrt(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_conjugate_op< typename Derived::Scalar >, const Derived > conj(const Eigen::ArrayBase< Derived > &x)
const int Dynamic
Definition Constants.h:22