lagv2(3)
π NAME π
lagv2 β the 2x2 generalized Schur factor, aka the tiny-but-mighty routine that fixes up your 2-by-2 pencil (A,B) π
β¨ SYNOPSIS β¨
Functions
subroutine dlagv2 (a, lda, b, ldb, alphar, alphai, beta, csl, snl, csr, snr)β double-precision bestie: DLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular. π«Άsubroutine slagv2 (a, lda, b, ldb, alphar, alphai, beta, csl, snl, csr, snr)β single-precision sibling, same energy: SLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular. π¦
π Detailed Description π
okay so this page is literally just the Function Documentation for the two routines above β they're twins, one's DOUBLE PRECISION, one's REAL, and the vibes are identical. no cap. π₯
π Function Documentation π
π subroutine dlagv2 (double precision, dimension( lda, * ) a, integer lda, double precision, dimension( ldb, * ) b, integer ldb, double precision, dimension( 2 ) alphar, double precision, dimension( 2 ) alphai, double precision, dimension( 2 ) beta, double precision csl, double precision snl, double precision csr, double precision snr)
DLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular. slay. π
πΈ Purpose:
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
- 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 ],
- 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
A
A is DOUBLE PRECISION array, dimension (LDA, 2). On entry, the 2 x 2 matrix A. On exit, A is overwritten by the "A-part" of the generalized Schur form. π
LDA
LDA is INTEGER. The leading dimension of the array A. LDA >= 2. (yes it's written THe in the source, we don't gatekeep typos π)
B
B is DOUBLE PRECISION array, dimension (LDB, 2). On entry, the upper triangular 2 x 2 matrix B. On exit, B is overwritten by the "B-part" of the generalized Schur form. β¨
LDB
LDB is INTEGER. The leading dimension of the array B. LDB >= 2.
ALPHAR
ALPHAR is DOUBLE PRECISION array, dimension (2).
ALPHAI
ALPHAI is DOUBLE PRECISION array, dimension (2).
BETA
BETA is DOUBLE PRECISION array, dimension (2). (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may be zero. (!! so watch out π«£)
CSL
CSL is DOUBLE PRECISION. The cosine of the left rotation matrix.
SNL
SNL is DOUBLE PRECISION. The sine of the left rotation matrix.
CSR
CSR is DOUBLE PRECISION. The cosine of the right rotation matrix.
SNR
SNR is DOUBLE PRECISION. The sine of the right rotation matrix.
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
π Definition at line 155 of file dlagv2.f.
π subroutine slagv2 (real, dimension( lda, * ) a, integer lda, real, dimension( ldb, * ) b, integer ldb, real, dimension( 2 ) alphar, real, dimension( 2 ) alphai, real, dimension( 2 ) beta, real csl, real snl, real csr, real snr)
SLAGV2 computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular. same routine, single precision, still iconic. β
πΈ Purpose:
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
- 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 ],
- 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
A
A is REAL array, dimension (LDA, 2). On entry, the 2 x 2 matrix A. On exit, A is overwritten by the "A-part" of the generalized Schur form. π
LDA
LDA is INTEGER. The leading dimension of the array A. LDA >= 2.
B
B is REAL array, dimension (LDB, 2). On entry, the upper triangular 2 x 2 matrix B. On exit, B is overwritten by the "B-part" of the generalized Schur form. π
LDB
LDB is INTEGER. The leading dimension of the array B. LDB >= 2.
ALPHAR
ALPHAR is REAL array, dimension (2).
ALPHAI
ALPHAI is REAL array, dimension (2).
BETA
BETA is REAL array, dimension (2). (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may be zero. π«£
CSL
CSL is REAL. The cosine of the left rotation matrix.
SNL
SNL is REAL. The sine of the left rotation matrix.
CSR
CSR is REAL. The cosine of the right rotation matrix.
SNR
SNR is REAL. The sine of the right rotation matrix.
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
π Definition at line 155 of file slagv2.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (the robots wrote the original, we just gave it main character energy πβ¨)
and that's the whole page bestie! π«Ά this absolute gem lives in LAPACK, Version 3.12.0 β go forth and factor those 2x2 pencils, mwah π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms