12#ifndef TLAPACK_STEQR_HH
13#define TLAPACK_STEQR_HH
56 enable_if_t<is_same_v<type_t<d_t>, real_type<type_t<d_t>>>,
int> = 0,
57 enable_if_t<is_same_v<type_t<e_t>, real_type<type_t<e_t>>>,
int> = 0>
68 const idx_t n = size(
d);
84 const idx_t
itmax = 30 * n;
113 if (square(
e[i - 1]) <=
178 r = (
d[i + 1] -
g) *
s +
two * c *
b;
185 auto z2 = col(
Z, i + 1);
212 r = (
d[i - 1] -
g) *
s +
two * c *
b;
219 auto z2 = col(
Z, i - 1);
235 for (idx_t i = 0; i < n - 1; ++i) {
238 for (idx_t j = i + 1; j < n; ++j) {
constexpr int sgn(const T &val)
Type-safe sgn function.
Definition utils.hpp:109
#define TLAPACK_SMATRIX
Macro for tlapack::concepts::SliceableMatrix compatible with C++17.
Definition concepts.hpp:899
real_type< TX, TY > lapy2(const TX &x, const TY &y)
Finds , taking care not to cause unnecessary overflow.
Definition lapy2.hpp:34
void laev2(T a, T b, T c, T &s1, T &s2, T &cs, T &sn)
Computes the eigenvalues and eigenvector of a real symmetric 2x2 matrix A [ a b ] [ b c ] On exit,...
Definition laev2.hpp:59
void lae2(T a, T b, T c, T &s1, T &s2)
Computes the eigenvalues of a real symmetric 2x2 matrix A [ a b ] [ b c ].
Definition lae2.hpp:49
void rot(vectorX_t &x, vectorY_t &y, const c_type &c, const s_type &s)
Apply plane rotation:
Definition rot.hpp:44
void swap(vectorX_t &x, vectorY_t &y)
Swap vectors, .
Definition swap.hpp:31
void lartg(const T &a, const T &b, real_type< T > &c, T &s, T &r)
Construct plane rotation that eliminates b, such that:
Definition lartg.hpp:38
int steqr(bool want_z, d_t &d, e_t &e, matrix_t &Z)
STEQR computes all eigenvalues and, optionally, eigenvectors of a hermitian tridiagonal matrix using ...
Definition steqr.hpp:58
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113