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);
52 SquareMatrixType
id, H1, H2;
53 id.setIdentity(rows, rows);
56 vv <<
Scalar(1), essential;
57 H1.applyHouseholderOnTheLeft(essential, beta, tmp);
58 H2.applyHouseholderOnTheRight(essential, beta, tmp);
65 v1 = VectorType::Random(rows);
66 if(even) v1.tail(rows-1).setZero();
69 m1.col(0).makeHouseholder(essential, beta, alpha);
70 m1.applyHouseholderOnTheLeft(essential,beta,tmp);
76 v1 = VectorType::Random(rows);
77 if(even) v1.tail(rows-1).setZero();
78 SquareMatrixType m3(rows,rows), m4(rows,rows);
79 m3.rowwise() = v1.transpose();
81 m3.row(0).makeHouseholder(essential, beta, alpha);
82 m3.applyHouseholderOnTheRight(essential.conjugate(),beta,tmp);
90 Index shift = internal::random<Index>(0, std::max<Index>(rows-2,0));
91 Index brows = rows - shift;
92 m1.setRandom(rows, cols);
93 HBlockMatrixType hbm =
m1.block(shift,0,brows,cols);
96 m2.block(shift,0,brows,cols) = qr.
matrixQR();
97 HCoeffsVectorType
hc = qr.
hCoeffs().conjugate();
99 hseq.
setLength(hc.size()).setShift(shift);
104 m5.block(shift,0,brows,cols).template triangularView<StrictlyLower>().
setZero();
109 SquareMatrixType hseq_mat = hseq;
110 SquareMatrixType hseq_mat_conj = hseq.
conjugate();
111 SquareMatrixType hseq_mat_adj = hseq.
adjoint();
112 SquareMatrixType hseq_mat_trans = hseq.
transpose();
113 SquareMatrixType m6 = SquareMatrixType::Random(rows, rows);
128 TMatrixType tm2 = m2.transpose();
130 rhseq.
setLength(hc.size()).setShift(shift);
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
#define CALL_SUBTEST_3(FUNC)
const MatrixType & matrixQR() const
#define CALL_SUBTEST_7(FUNC)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC Index length() const
Returns the length of the Householder sequence.
static const Similarity3 id
HouseholderQR< MatrixXf > qr(A)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
EIGEN_DEVICE_FUNC Index shift() const
Returns the shift of the Householder sequence.
Sequence of Householder reflections acting on subspaces with decreasing size.
static const VectorValues vv
#define VERIFY_IS_APPROX(a, b)
void householder(const MatrixType &m)
#define CALL_SUBTEST_1(FUNC)
EIGEN_DECLARE_TEST(householder)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC HouseholderSequence & setLength(Index length)
Sets the length of the Householder sequence.
#define CALL_SUBTEST_8(FUNC)
AdjointReturnType adjoint() const
Adjoint (conjugate transpose) of the Householder sequence.
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
#define CALL_SUBTEST_5(FUNC)
#define EIGEN_TEST_MAX_SIZE
Householder QR decomposition of a matrix.
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
#define CALL_SUBTEST_2(FUNC)
The matrix class, also used for vectors and row-vectors.
TransposeReturnType transpose() const
Transpose of the Householder sequence.
ConjugateReturnType conjugate() const
Complex conjugate of the Householder sequence.
const HCoeffsType & hCoeffs() const