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();
79 if(tailSqNorm == RealScalar(0) && numext::imag(c0)==RealScalar(0))
82 beta = numext::real(c0);
87 beta = sqrt(numext::abs2(c0) + tailSqNorm);
88 if (numext::real(c0)>=RealScalar(0))
90 essential = tail / (c0 - beta);
91 tau = conj((beta - c0) / beta);
110 template<
typename Derived>
111 template<
typename EssentialPart>
113 const EssentialPart& essential,
125 tmp.noalias() = essential.adjoint() * bottom;
127 this->row(0) -= tau * tmp;
128 bottom.noalias() -= tau * essential * tmp;
147 template<
typename Derived>
148 template<
typename EssentialPart>
150 const EssentialPart& essential,
162 tmp.noalias() = right * essential.conjugate();
164 this->col(0) -= tau * tmp;
165 right.noalias() -= tau * tmp * essential.transpose();
171 #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
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:104
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
typename detail::split_list_< List... >::tail tail
Get the list without its first element.
Definition: SplitList.h:58
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:112
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
Expression of a fixed-size or dynamic-size sub-vector.
Definition: ForwardDeclarations.h:83
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:149
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
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48