11 #ifndef EIGEN_HOUSEHOLDER_H 12 #define EIGEN_HOUSEHOLDER_H 41 template<
typename Derived>
45 makeHouseholder(essentialPart, tau, beta);
63 template<
typename Derived>
64 template<
typename EssentialPart>
66 EssentialPart& essential,
68 RealScalar& beta)
const 73 EIGEN_STATIC_ASSERT_VECTOR_ONLY(EssentialPart)
76 RealScalar tailSqNorm = size()==1 ? RealScalar(0) : tail.squaredNorm();
78 const RealScalar tol = (std::numeric_limits<RealScalar>::min)();
80 if(tailSqNorm <= tol && numext::abs2(numext::imag(c0))<=tol)
83 beta = numext::real(c0);
88 beta = sqrt(numext::abs2(c0) + tailSqNorm);
89 if (numext::real(c0)>=RealScalar(0))
91 essential = tail / (c0 - beta);
92 tau = conj((beta - c0) / beta);
111 template<
typename Derived>
112 template<
typename EssentialPart>
114 const EssentialPart& essential,
126 tmp.noalias() = essential.adjoint() * bottom;
128 this->row(0) -= tau * tmp;
129 bottom.noalias() -= tau * essential * tmp;
148 template<
typename Derived>
149 template<
typename EssentialPart>
151 const EssentialPart& essential,
163 tmp.noalias() = right * essential.conjugate();
165 this->col(0) -= tau * tmp;
166 right.noalias() -= tau * tmp * essential.transpose();
172 #endif // EIGEN_HOUSEHOLDER_H void makeHouseholder(EssentialPart &essential, Scalar &tau, RealScalar &beta) const
Computes the elementary reflector H such that: where the transformation H is: and the vector v is: ...
Definition: Householder.h:65
internal::traits< Derived >::Scalar Scalar
The numeric type of the expression' coefficients, e.g.
Definition: DenseBase.h:66
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:88
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
void applyHouseholderOnTheLeft(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Apply the elementary reflector H given by with from the left to a vector or matrix.
Definition: Householder.h:113
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:87
Definition: Householder.h:17
Definition: BandTriangularSolver.h:13
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:103
void applyHouseholderOnTheRight(const EssentialPart &essential, const Scalar &tau, Scalar *workspace)
Apply the elementary reflector H given by with from the right to a vector or matrix.
Definition: Householder.h:150
void makeHouseholderInPlace(Scalar &tau, RealScalar &beta)
Computes the elementary reflector H such that: where the transformation H is: and the vector v is: ...
Definition: Householder.h:42
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21