lags2#

Functions

void slags2(
    const INT  upper,
    const f32  a1,
    const f32  a2,
    const f32  a3,
    const f32  b1,
    const f32  b2,
    const f32  b3,
          f32* csu,
          f32* snu,
          f32* csv,
          f32* snv,
          f32* csq,
          f32* snq
);
void slags2(const INT upper, const f32 a1, const f32 a2, const f32 a3, const f32 b1, const f32 b2, const f32 b3, f32 *csu, f32 *snu, f32 *csv, f32 *snv, f32 *csq, f32 *snq)#

SLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such that if ( UPPER ) then.

      U**T *A*Q = U**T *( A1 A2 )*Q = ( x  0  )
                        ( 0  A3 )     ( x  x  )
and V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 ) ( 0 B3 ) ( x x )

or if ( .NOT.UPPER ) then

      U**T *A*Q = U**T *( A1 0  )*Q = ( x  x  )
                        ( A2 A3 )     ( 0  x  )
and V**T*B*Q = V**T*( B1 0 )*Q = ( x x ) ( B2 B3 ) ( 0 x )

The rows of the transformed A and B are parallel, where

U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ ) ( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )

Z**T denotes the transpose of Z.

Parameters

in
upper

= nonzero: the input matrices A and B are upper triangular. = 0: the input matrices A and B are lower triangular.

in
a1

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a2

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a3

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
b1

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b2

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b3

Element of the input 2-by-2 upper (lower) triangular matrix B.

out
csu

The desired orthogonal matrix U.

out
snu

The desired orthogonal matrix U.

out
csv

The desired orthogonal matrix V.

out
snv

The desired orthogonal matrix V.

out
csq

The desired orthogonal matrix Q.

out
snq

The desired orthogonal matrix Q.

Functions

void dlags2(
    const INT  upper,
    const f64  a1,
    const f64  a2,
    const f64  a3,
    const f64  b1,
    const f64  b2,
    const f64  b3,
          f64* csu,
          f64* snu,
          f64* csv,
          f64* snv,
          f64* csq,
          f64* snq
);
void dlags2(const INT upper, const f64 a1, const f64 a2, const f64 a3, const f64 b1, const f64 b2, const f64 b3, f64 *csu, f64 *snu, f64 *csv, f64 *snv, f64 *csq, f64 *snq)#

DLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such that if ( UPPER ) then.

      U**T *A*Q = U**T *( A1 A2 )*Q = ( x  0  )
                        ( 0  A3 )     ( x  x  )
and V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 ) ( 0 B3 ) ( x x )

or if ( .NOT.UPPER ) then

      U**T *A*Q = U**T *( A1 0  )*Q = ( x  x  )
                        ( A2 A3 )     ( 0  x  )
and V**T*B*Q = V**T*( B1 0 )*Q = ( x x ) ( B2 B3 ) ( 0 x )

The rows of the transformed A and B are parallel, where

U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ ) ( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )

Z**T denotes the transpose of Z.

Parameters

in
upper

= nonzero: the input matrices A and B are upper triangular. = 0: the input matrices A and B are lower triangular.

in
a1

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a2

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a3

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
b1

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b2

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b3

Element of the input 2-by-2 upper (lower) triangular matrix B.

out
csu

The desired orthogonal matrix U.

out
snu

The desired orthogonal matrix U.

out
csv

The desired orthogonal matrix V.

out
snv

The desired orthogonal matrix V.

out
csq

The desired orthogonal matrix Q.

out
snq

The desired orthogonal matrix Q.

Functions

void clags2(
    const INT  upper,
    const f32  a1,
    const c64  a2,
    const f32  a3,
    const f32  b1,
    const c64  b2,
    const f32  b3,
          f32* csu,
          c64* snu,
          f32* csv,
          c64* snv,
          f32* csq,
          c64* snq
);
void clags2(const INT upper, const f32 a1, const c64 a2, const f32 a3, const f32 b1, const c64 b2, const f32 b3, f32 *csu, c64 *snu, f32 *csv, c64 *snv, f32 *csq, c64 *snq)#

CLAGS2 computes 2-by-2 unitary matrices U, V and Q, such that if ( UPPER ) then.

      U**H *A*Q = U**H *( A1 A2 )*Q = ( x  0  )
                        ( 0  A3 )     ( x  x  )
and V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 ) ( 0 B3 ) ( x x )

or if ( .NOT.UPPER ) then

      U**H *A*Q = U**H *( A1 0  )*Q = ( x  x  )
                        ( A2 A3 )     ( 0  x  )
and V**H *B*Q = V**H *( B1 0 )*Q = ( x x ) ( B2 B3 ) ( 0 x ) where

U = ( CSU SNU ), V = ( CSV SNV ), ( -SNU**H CSU ) ( -SNV**H CSV )

Q = ( CSQ SNQ ) ( -SNQ**H CSQ )

The rows of the transformed A and B are parallel. Moreover, if the input 2-by-2 matrix A is not zero, then the transformed (1,1) entry of A is not zero. If the input matrices A and B are both not zero, then the transformed (2,2) element of B is not zero, except when the first rows of input A and B are parallel and the second rows are zero.

Parameters

in
upper

= nonzero: the input matrices A and B are upper triangular. = 0: the input matrices A and B are lower triangular.

in
a1

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a2

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a3

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
b1

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b2

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b3

Element of the input 2-by-2 upper (lower) triangular matrix B.

out
csu

The desired unitary matrix U.

out
snu

The desired unitary matrix U.

out
csv

The desired unitary matrix V.

out
snv

The desired unitary matrix V.

out
csq

The desired unitary matrix Q.

out
snq

The desired unitary matrix Q.

Functions

void zlags2(
    const INT   upper,
    const f64   a1,
    const c128  a2,
    const f64   a3,
    const f64   b1,
    const c128  b2,
    const f64   b3,
          f64*  csu,
          c128* snu,
          f64*  csv,
          c128* snv,
          f64*  csq,
          c128* snq
);
void zlags2(const INT upper, const f64 a1, const c128 a2, const f64 a3, const f64 b1, const c128 b2, const f64 b3, f64 *csu, c128 *snu, f64 *csv, c128 *snv, f64 *csq, c128 *snq)#

ZLAGS2 computes 2-by-2 unitary matrices U, V and Q, such that if ( UPPER ) then.

      U**H *A*Q = U**H *( A1 A2 )*Q = ( x  0  )
                        ( 0  A3 )     ( x  x  )
and V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 ) ( 0 B3 ) ( x x )

or if ( .NOT.UPPER ) then

      U**H *A*Q = U**H *( A1 0  )*Q = ( x  x  )
                        ( A2 A3 )     ( 0  x  )
and V**H *B*Q = V**H *( B1 0 )*Q = ( x x ) ( B2 B3 ) ( 0 x ) where

U = ( CSU SNU ), V = ( CSV SNV ), ( -SNU**H CSU ) ( -SNV**H CSV )

Q = ( CSQ SNQ ) ( -SNQ**H CSQ )

The rows of the transformed A and B are parallel. Moreover, if the input 2-by-2 matrix A is not zero, then the transformed (1,1) entry of A is not zero. If the input matrices A and B are both not zero, then the transformed (2,2) element of B is not zero, except when the first rows of input A and B are parallel and the second rows are zero.

Parameters

in
upper

= nonzero: the input matrices A and B are upper triangular. = 0: the input matrices A and B are lower triangular.

in
a1

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a2

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
a3

Element of the input 2-by-2 upper (lower) triangular matrix A.

in
b1

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b2

Element of the input 2-by-2 upper (lower) triangular matrix B.

in
b3

Element of the input 2-by-2 upper (lower) triangular matrix B.

out
csu

The desired unitary matrix U.

out
snu

The desired unitary matrix U.

out
csv

The desired unitary matrix V.

out
snv

The desired unitary matrix V.

out
csq

The desired unitary matrix Q.

out
snq

The desired unitary matrix Q.