12#ifndef TLAPACK_LAHQR_SHIFTCOLUMN_HH
13#define TLAPACK_LAHQR_SHIFTCOLUMN_HH
40 enable_if_t<is_real<type_t<matrix_t>>,
bool> =
true>
51 const idx_t n = ncols(
H);
116 enable_if_t<is_complex<type_t<matrix_t>>,
bool> =
true>
128 const idx_t n = ncols(
H);
144 v[0] =
h10s *
H(0, 1) + (
H(0, 0) -
s1) * ((
H(0, 0) -
s2) /
s);
158 v[0] = (
H(0, 0) -
s1) * ((
H(0, 0) -
s2) /
s) +
H(0, 1) *
h10s +
constexpr real_type< T > real(const T &x) noexcept
Extends std::real() to real datatypes.
Definition utils.hpp:71
constexpr real_type< T > abs1(const T &x)
1-norm absolute value, |Re(x)| + |Im(x)|
Definition utils.hpp:133
constexpr real_type< T > imag(const T &x) noexcept
Extends std::imag() to real datatypes.
Definition utils.hpp:86
#define TLAPACK_VECTOR
Macro for tlapack::concepts::Vector compatible with C++17.
Definition concepts.hpp:906
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
int lahqr_shiftcolumn(const matrix_t &H, vector_t &v, complex_type< type_t< matrix_t > > s1, complex_type< type_t< matrix_t > > s2)
Given a 2-by-2 or 3-by-3 matrix H, lahqr_shiftcolumn calculates a multiple of the product: (H - s1*I)...
Definition lahqr_shiftcolumn.hpp:41
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
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
typename traits::complex_type_traits< Types..., int >::type complex_type
The common complex type of the list of types.
Definition scalar_type_traits.hpp:188