tgex2#
Functions
-
void stgex2(const INT wantq, const INT wantz, const INT n, f32 *restrict A, const INT lda, f32 *restrict B, const INT ldb, f32 *restrict Q, const INT ldq, f32 *restrict Z, const INT ldz, const INT j1, const INT n1, const INT n2, f32 *restrict work, const INT lwork, INT *info)#
STGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22) of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair (A, B) by an orthogonal equivalence transformation.
Parameters
inwantqIf nonzero, update the left transformation matrix Q.
inwantzIf nonzero, update the right transformation matrix Z.
innThe order of the matrices A and B. n >= 0.
inoutAArray of dimension (lda, n). On entry, the matrix A. On exit, the updated matrix A.
inldaThe leading dimension of A. lda >= max(1, n).
inoutBArray of dimension (ldb, n). On entry, the matrix B. On exit, the updated matrix B.
inldbThe leading dimension of B. ldb >= max(1, n).
inoutQArray of dimension (ldq, n). If wantq, the orthogonal matrix Q. On exit, the updated matrix Q. Not referenced if !wantq.
inldqThe leading dimension of Q. ldq >= 1; if wantq, ldq >= n.
inoutZArray of dimension (ldz, n). If wantz, the orthogonal matrix Z. On exit, the updated matrix Z. Not referenced if !wantz.
inldzThe leading dimension of Z. ldz >= 1; if wantz, ldz >= n.
inj1The index to the first block (A11, B11). 0 <= j1 < n (0-based).
inn1The order of the first block. n1 = 0, 1, or 2.
inn2The order of the second block. n2 = 0, 1, or 2.
outworkArray of dimension (lwork).
inlworkThe dimension of work. lwork >= max(1, n*(n2+n1), (n2+n1)^2 * 2).
outinfo= 0: successful exit
= 1: the swap was rejected; blocks not swapped
= -16: lwork too small
void stgex2(
const INT wantq,
const INT wantz,
const INT n,
f32* restrict A,
const INT lda,
f32* restrict B,
const INT ldb,
f32* restrict Q,
const INT ldq,
f32* restrict Z,
const INT ldz,
const INT j1,
const INT n1,
const INT n2,
f32* restrict work,
const INT lwork,
INT* info
);
Functions
-
void dtgex2(const INT wantq, const INT wantz, const INT n, f64 *restrict A, const INT lda, f64 *restrict B, const INT ldb, f64 *restrict Q, const INT ldq, f64 *restrict Z, const INT ldz, const INT j1, const INT n1, const INT n2, f64 *restrict work, const INT lwork, INT *info)#
DTGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22) of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair (A, B) by an orthogonal equivalence transformation.
Parameters
inwantqIf nonzero, update the left transformation matrix Q.
inwantzIf nonzero, update the right transformation matrix Z.
innThe order of the matrices A and B. n >= 0.
inoutAArray of dimension (lda, n). On entry, the matrix A. On exit, the updated matrix A.
inldaThe leading dimension of A. lda >= max(1, n).
inoutBArray of dimension (ldb, n). On entry, the matrix B. On exit, the updated matrix B.
inldbThe leading dimension of B. ldb >= max(1, n).
inoutQArray of dimension (ldq, n). If wantq, the orthogonal matrix Q. On exit, the updated matrix Q. Not referenced if !wantq.
inldqThe leading dimension of Q. ldq >= 1; if wantq, ldq >= n.
inoutZArray of dimension (ldz, n). If wantz, the orthogonal matrix Z. On exit, the updated matrix Z. Not referenced if !wantz.
inldzThe leading dimension of Z. ldz >= 1; if wantz, ldz >= n.
inj1The index to the first block (A11, B11). 0 <= j1 < n (0-based).
inn1The order of the first block. n1 = 0, 1, or 2.
inn2The order of the second block. n2 = 0, 1, or 2.
outworkArray of dimension (lwork).
inlworkThe dimension of work. lwork >= max(1, n*(n2+n1), (n2+n1)^2 * 2).
outinfo= 0: successful exit
= 1: the swap was rejected; blocks not swapped
= -16: lwork too small
void dtgex2(
const INT wantq,
const INT wantz,
const INT n,
f64* restrict A,
const INT lda,
f64* restrict B,
const INT ldb,
f64* restrict Q,
const INT ldq,
f64* restrict Z,
const INT ldz,
const INT j1,
const INT n1,
const INT n2,
f64* restrict work,
const INT lwork,
INT* info
);
Functions
-
void ctgex2(const INT wantq, const INT wantz, const INT n, c64 *restrict A, const INT lda, c64 *restrict B, const INT ldb, c64 *restrict Q, const INT ldq, c64 *restrict Z, const INT ldz, const INT j1, INT *info)#
CTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22) in an upper triangular matrix pair (A, B) by a unitary equivalence transformation.
(A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.
Optionally, the matrices Q and Z of generalized Schur vectors are updated.
Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
Parameters
inwantqIf nonzero, update the left transformation matrix Q.
inwantzIf nonzero, update the right transformation matrix Z.
innThe order of the matrices A and B. n >= 0.
inoutAComplex array of dimension (lda, n). On entry, the matrix A. On exit, the updated matrix A.
inldaThe leading dimension of A. lda >= max(1, n).
inoutBComplex array of dimension (ldb, n). On entry, the matrix B. On exit, the updated matrix B.
inldbThe leading dimension of B. ldb >= max(1, n).
inoutQComplex array of dimension (ldq, n). If wantq, the unitary matrix Q. On exit, the updated matrix Q. Not referenced if !wantq.
inldqThe leading dimension of Q. ldq >= 1; if wantq, ldq >= n.
inoutZComplex array of dimension (ldz, n). If wantz, the unitary matrix Z. On exit, the updated matrix Z. Not referenced if !wantz.
inldzThe leading dimension of Z. ldz >= 1; if wantz, ldz >= n.
inj1The index to the first block (A11, B11). 0-based.
outinfo= 0: successful exit
= 1: the transformed matrix pair (A, B) would be too far from generalized Schur form; the problem is ill-conditioned.
void ctgex2(
const INT wantq,
const INT wantz,
const INT n,
c64* restrict A,
const INT lda,
c64* restrict B,
const INT ldb,
c64* restrict Q,
const INT ldq,
c64* restrict Z,
const INT ldz,
const INT j1,
INT* info
);
Functions
-
void ztgex2(const INT wantq, const INT wantz, const INT n, c128 *restrict A, const INT lda, c128 *restrict B, const INT ldb, c128 *restrict Q, const INT ldq, c128 *restrict Z, const INT ldz, const INT j1, INT *info)#
ZTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22) in an upper triangular matrix pair (A, B) by a unitary equivalence transformation.
(A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.
Optionally, the matrices Q and Z of generalized Schur vectors are updated.
Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
Parameters
inwantqIf nonzero, update the left transformation matrix Q.
inwantzIf nonzero, update the right transformation matrix Z.
innThe order of the matrices A and B. n >= 0.
inoutAComplex array of dimension (lda, n). On entry, the matrix A. On exit, the updated matrix A.
inldaThe leading dimension of A. lda >= max(1, n).
inoutBComplex array of dimension (ldb, n). On entry, the matrix B. On exit, the updated matrix B.
inldbThe leading dimension of B. ldb >= max(1, n).
inoutQComplex array of dimension (ldq, n). If wantq, the unitary matrix Q. On exit, the updated matrix Q. Not referenced if !wantq.
inldqThe leading dimension of Q. ldq >= 1; if wantq, ldq >= n.
inoutZComplex array of dimension (ldz, n). If wantz, the unitary matrix Z. On exit, the updated matrix Z. Not referenced if !wantz.
inldzThe leading dimension of Z. ldz >= 1; if wantz, ldz >= n.
inj1The index to the first block (A11, B11). 0-based.
outinfo= 0: successful exit
= 1: the transformed matrix pair (A, B) would be too far from generalized Schur form; the problem is ill-conditioned.
void ztgex2(
const INT wantq,
const INT wantz,
const INT n,
c128* restrict A,
const INT lda,
c128* restrict B,
const INT ldb,
c128* restrict Q,
const INT ldq,
c128* restrict Z,
const INT ldz,
const INT j1,
INT* info
);