15 static bool even =
true;
38 EssentialVectorType essential;
40 VectorType
v1 = VectorType::Random(rows),
v2;
42 v1.makeHouseholder(essential, beta, alpha);
43 v1.applyHouseholderOnTheLeft(essential,beta,tmp);
46 v1 = VectorType::Random(rows);
48 v1.applyHouseholderOnTheLeft(essential,beta,tmp);
54 v1 = VectorType::Random(rows);
55 if(even) v1.tail(rows-1).setZero();
58 m1.col(0).makeHouseholder(essential, beta, alpha);
59 m1.applyHouseholderOnTheLeft(essential,beta,tmp);
65 v1 = VectorType::Random(rows);
66 if(even) v1.tail(rows-1).setZero();
67 SquareMatrixType m3(rows,rows), m4(rows,rows);
68 m3.rowwise() = v1.transpose();
70 m3.row(0).makeHouseholder(essential, beta, alpha);
71 m3.applyHouseholderOnTheRight(essential,beta,tmp);
79 Index shift = internal::random<Index>(0, std::max<Index>(rows-2,0));
80 Index brows = rows - shift;
81 m1.setRandom(rows, cols);
82 HBlockMatrixType hbm =
m1.block(shift,0,brows,cols);
85 m2.block(shift,0,brows,cols) = qr.
matrixQR();
86 HCoeffsVectorType
hc = qr.
hCoeffs().conjugate();
88 hseq.
setLength(hc.size()).setShift(shift);
93 m5.block(shift,0,brows,cols).template triangularView<StrictlyLower>().
setZero();
98 SquareMatrixType hseq_mat = hseq;
99 SquareMatrixType hseq_mat_conj = hseq.
conjugate();
100 SquareMatrixType hseq_mat_adj = hseq.
adjoint();
101 SquareMatrixType hseq_mat_trans = hseq.
transpose();
102 SquareMatrixType m6 = SquareMatrixType::Random(rows, rows);
117 TMatrixType tm2 = m2.transpose();
119 rhseq.
setLength(hc.size()).setShift(shift);
Index length() const
Returns the length of the Householder sequence.
HouseholderSequence & setLength(Index length)
Sets the length of the Householder sequence.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
const HCoeffsType & hCoeffs() const
HouseholderSequence transpose() const
Transpose of the Householder sequence.
HouseholderQR< MatrixXf > qr(A)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Sequence of Householder reflections acting on subspaces with decreasing size.
#define VERIFY_IS_APPROX(a, b)
void householder(const MatrixType &m)
ConjugateReturnType conjugate() const
Complex conjugate of the Householder sequence.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
ConjugateReturnType adjoint() const
Adjoint (conjugate transpose) of the Householder sequence.
#define EIGEN_TEST_MAX_SIZE
Householder QR decomposition of a matrix.
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
Index shift() const
Returns the shift of the Householder sequence.
The matrix class, also used for vectors and row-vectors.
const MatrixType & matrixQR() const