naginterfaces.library.lapackeig.dtgexc

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

dtgexc reorders the generalized Schur factorization of a matrix pair in real generalized Schur form.

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

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f08/f08yff.html

Parameters
wantqbool

If , update the left transformation matrix .

If , do not update .

wantzbool

If , update the right transformation matrix .

If , do not update .

afloat, array-like, shape

The matrix in the pair .

bfloat, array-like, shape

The matrix , in the pair .

qfloat, 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 orthogonal matrix .

zfloat, 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 orthogonal matrix .

ifstint

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

ilstint

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

Returns
afloat, ndarray, shape

The updated matrix .

bfloat, ndarray, shape

The updated matrix

qfloat, ndarray, shape

If , the updated matrix .

If , is not referenced.

zfloat, ndarray, shape

If , the updated matrix .

If , is not referenced.

ifstint

If pointed on entry to the second row of a block, it is changed to point to the first row; always points to the first row of the block in its final position (which may differ from its input value by or ).

ilstint

If pointed on entry to the second row of a block, it is changed to point to the first row; always points to the first row of the block in its final position (which may differ from its input value by or ).

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

dtgexc reorders the generalized real matrix pair in real generalized Schur form, so that the diagonal element or block of with row index is moved to row , using an orthogonal equivalence transformation. That is, and are factorized as

where are also in real generalized Schur form.

The pair are in real generalized Schur form if is block upper triangular with and diagonal blocks and is upper triangular as returned, for example, by dgges3(), or dhgeqz() 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