# naginterfaces.library.lapackeig.ztgexc¶

naginterfaces.library.lapackeig.ztgexc(wantq, wantz, a, b, q, z, ifst, ilst)[source]

ztgexc reorders the generalized Schur factorization of a complex matrix pair in generalized Schur form.

For full information please refer to the NAG Library document for f08yt

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/f08/f08ytf.html

Parameters
wantqbool

If , update the left transformation matrix .

If , do not update .

wantzbool

If , update the right transformation matrix .

If , do not update .

acomplex, array-like, shape

The matrix in the pair .

bcomplex, array-like, shape

The matrix , in the pair .

qcomplex, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If , the unitary matrix .

zcomplex, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If , the unitary matrix .

ifstint

The indices and that specify the reordering of the diagonal elements of . The element with row index is moved to row , by a sequence of swapping between adjacent diagonal elements.

ilstint

The indices and that specify the reordering of the diagonal elements of . The element with row index is moved to row , by a sequence of swapping between adjacent diagonal elements.

Returns
acomplex, ndarray, shape

The updated matrix .

bcomplex, ndarray, shape

The updated matrix

qcomplex, ndarray, shape

If , the updated matrix .

If , is not referenced.

zcomplex, ndarray, shape

If , the updated matrix .

If , is not referenced.

ilstint

points to the row in its final position.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: and .

(errno )

The transformed matrix pair would be too far from generalized Schur form; the problem is ill-conditioned. may have been partially reordered, and points to the first row of the current position of the block being moved.

Notes

ztgexc reorders the generalized complex matrix pair in generalized Schur form, so that the diagonal element of with row index is moved to row , using a unitary equivalence transformation. That is, and are factorized as

where are also in generalized Schur form.

The pair are in generalized Schur form if and are upper triangular as returned, for example, by zgges3(), or zhgeqz() with .

If and are the result of a generalized Schur factorization of a matrix pair

then, optionally, the matrices and can be updated as and .

References

Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia, https://www.netlib.org/lapack/lug