12#ifndef __TLAPACK_LAHQZ_SCHUR22_HH__
13#define __TLAPACK_LAHQZ_SCHUR22_HH__
62template <TLAPACK_MATRIX A_t, TLAPACK_MATRIX B_t>
129 A(1, 1) = cl *
A(1, 1) -
conj(
sl) *
A(0, 1);
132 B(1, 1) = cl *
B(1, 1) -
conj(
sl) *
B(0, 1);
219 B(1, 1) =
cr *
B(1, 1);
255 A(0, 0) = cl *
A(0, 0) +
sl *
A(1, 0);
261 B(0, 0) = cl *
B(0, 0) +
sl *
B(1, 0);
268 A(1, 1) = cl *
A(1, 1) -
conj(
sl) *
A(0, 1);
271 B(1, 1) = cl *
B(1, 1) -
conj(
sl) *
B(0, 1);
281 svd22<real_t>(
B(0, 0),
B(0, 1),
B(1, 1),
ssmin,
ssmax, cl,
sl,
289 A(1, 0) = cl *
A(1, 0) -
sl *
A(0, 0);
292 A(1, 1) = cl *
A(1, 1) -
sl *
A(0, 1);
297 A(0, 1) =
cr *
A(0, 1) -
sr *
A(0, 0);
300 A(1, 1) =
cr *
A(1, 1) -
sr *
A(1, 0);
371 if (
A(1, 0) ==
TA(0)) {
real_type< TX, TY > lapy2(const TX &x, const TY &y)
Finds , taking care not to cause unnecessary overflow.
Definition lapy2.hpp:34
void rotg(T &a, T &b, T &c, T &s)
Construct plane rotation that eliminates b, such that:
Definition rotg.hpp:39
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
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
constexpr real_type< T > real(const T &x) noexcept
Extends std::real() to real datatypes.
Definition utils.hpp:71
constexpr T conj(const T &x) noexcept
Extends std::conj() to real datatypes.
Definition utils.hpp:100
constexpr real_type< T > abs1(const T &x)
1-norm absolute value, |Re(x)| + |Im(x)|
Definition utils.hpp:133
void lahqz_schur22(A_t &A, B_t &B, complex_type< type_t< A_t > > &alpha1, complex_type< type_t< A_t > > &alpha2, real_type< type_t< A_t > > &beta1, real_type< type_t< A_t > > &beta2, real_type< type_t< A_t > > &cl, type_t< A_t > &sl, real_type< type_t< A_t > > &cr, type_t< A_t > &sr, type_t< A_t > &scal0, type_t< A_t > &scal1)
Computes the generalized Schur factorization of a 2x2 pencil (A,B) with B upper triangular.
Definition lahqz_schur22.hpp:63
constexpr real_type< T > imag(const T &x) noexcept
Extends std::imag() to real datatypes.
Definition utils.hpp:86
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
void lahqz_eig22(const A_t &A, const B_t &B, complex_type< T > &alpha1, complex_type< T > &alpha2, T &beta1, T &beta2)
Computes the generalized eigenvalues of a 2x2 pencil (A,B) with B upper triangular.
Definition lahqz_eig22.hpp:33