20template <SquareMatrix Mat>
37 std::integral_constant<std::size_t, k>) {
55 for (std::size_t
i =
k + 1,
a = 0;
i <
N; ++
i, ++
a)
56 for (std::size_t
j =
k,
b = 0;
j <
N; ++
j, ++
b)
65 for (std::size_t
i = 0,
a = 0;
i <
N; ++
i, ++
a)
66 for (std::size_t
j =
k + 1,
b = 0;
j <
N; ++
j, ++
b)
70 for (std::size_t
j =
k + 2,
a = 1;
j <
N; ++
j, ++
a)
71 H_pack(
j,
k) = v(
a, 0);
80 constexpr auto H()
const {
82 for (std::size_t
i = 0;
i <
N; ++
i) {
83 for (std::size_t
j = 0;
j <
N; ++
j) {
84 if (
i >= 2 &&
j <= (
i - 2))
continue;
96 constexpr auto U()
const {
99 std::integral_constant<std::size_t, k>) {
100 const std::size_t
j =
N -
k - 1;
103 for (std::size_t
i =
k + 2,
a = 1;
i <
N; ++
i, ++
a) v(
a) = H_pack(
i,
k);
114 for (std::size_t
r = 0;
r <
N; ++
r)
115 for (std::size_t c =
k + 1,
a = 0; c <
N; ++c, ++
a)
129 if (
i >= 2 &&
j <= (
i - 2))
return T(0);
Field classified by scalar_traits as complex.
typename scalar_traits_t< T >::real_type real_type_t
Associated real component type registered for T.
constexpr auto conjugate_transpose(const Mat &A)
conjugate transpose of a matrix
constexpr void constexpr_for(Func &&f)
constexpr for loop which recursively unrolls a dynamic for loop into compile time recursive loop
constexpr auto transpose(const Vec &x)
tranpose of a vector
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
constexpr auto get_col(const Mat &A, std::size_t idx)
get the column of matrix A based on given index
constexpr auto as_col_vector(const Vec &X)
express the vector X as a column vector (N x 1)
Endomorphism operator CRTP base.
matrix_scalar_t< Mat > T
alias helpers for types
static constexpr std::size_t N
helper to extract N
Reduces A to upper Hessenberg form H = U^* A U.
constexpr auto U() const
Reconstruct the orthogonal or unitary similarity basis.
constexpr Hessenberg(const Mat &A)
Reduce A by two-sided Householder similarities.
Vector< T, N > beta
Vector member variables.
constexpr auto operator()(std::size_t i, std::size_t j) const
Read an entry of the Hessenberg matrix.
constexpr auto H() const
Extract the upper Hessenberg matrix.
Compact representation of a real or complex Householder reflector.
Owning, fixed-size, row-major matrix container over a scalar field.
Owning, fixed-size vector container.