lagv2#

Functions

void slagv2(
          f32* restrict A,
    const INT           lda,
          f32* restrict B,
    const INT           ldb,
          f32* restrict alphar,
          f32* restrict alphai,
          f32* restrict beta,
          f32*          csl,
          f32*          snl,
          f32*          csr,
          f32*          snr
);
void slagv2(f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, f32 *restrict alphar, f32 *restrict alphai, f32 *restrict beta, f32 *csl, f32 *snl, f32 *csr, f32 *snr)#

SLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular.

This routine computes orthogonal (rotation) matrices given by CSL, SNL and CSR, SNR such that

1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0 types), then

[ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ] [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]

[ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ] [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],

2) if the pencil (A,B) has a pair of complex conjugate eigenvalues, then

[ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ] [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]

[ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ] [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]

where b11 >= b22 > 0.

Parameters

inout
A

Array of dimension (lda, 2). On entry, the 2x2 matrix A. On exit, overwritten by the “A-part” of the generalized Schur form.

in
lda

The leading dimension of A. lda >= 2.

inout
B

Array of dimension (ldb, 2). On entry, the upper triangular 2x2 matrix B. On exit, overwritten by the “B-part” of the generalized Schur form.

in
ldb

The leading dimension of B. ldb >= 2.

out
alphar

Array of dimension (2). Real parts of eigenvalue numerators.

out
alphai

Array of dimension (2). Imaginary parts of eigenvalue numerators.

out
beta

Array of dimension (2). Eigenvalue denominators.

out
csl

The cosine of the left rotation matrix.

out
snl

The sine of the left rotation matrix.

out
csr

The cosine of the right rotation matrix.

out
snr

The sine of the right rotation matrix.

Functions

void dlagv2(
          f64* restrict A,
    const INT           lda,
          f64* restrict B,
    const INT           ldb,
          f64* restrict alphar,
          f64* restrict alphai,
          f64* restrict beta,
          f64*          csl,
          f64*          snl,
          f64*          csr,
          f64*          snr
);
void dlagv2(f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, f64 *restrict alphar, f64 *restrict alphai, f64 *restrict beta, f64 *csl, f64 *snl, f64 *csr, f64 *snr)#

DLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular.

This routine computes orthogonal (rotation) matrices given by CSL, SNL and CSR, SNR such that

1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0 types), then

[ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ] [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]

[ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ] [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],

2) if the pencil (A,B) has a pair of complex conjugate eigenvalues, then

[ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ] [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]

[ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ] [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]

where b11 >= b22 > 0.

Parameters

inout
A

Array of dimension (lda, 2). On entry, the 2x2 matrix A. On exit, overwritten by the “A-part” of the generalized Schur form.

in
lda

The leading dimension of A. lda >= 2.

inout
B

Array of dimension (ldb, 2). On entry, the upper triangular 2x2 matrix B. On exit, overwritten by the “B-part” of the generalized Schur form.

in
ldb

The leading dimension of B. ldb >= 2.

out
alphar

Array of dimension (2). Real parts of eigenvalue numerators.

out
alphai

Array of dimension (2). Imaginary parts of eigenvalue numerators.

out
beta

Array of dimension (2). Eigenvalue denominators.

out
csl

The cosine of the left rotation matrix.

out
snl

The sine of the left rotation matrix.

out
csr

The cosine of the right rotation matrix.

out
snr

The sine of the right rotation matrix.