F08QTF (ZTREXC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08QTF (ZTREXC)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

F08QTF (ZTREXC) reorders the Schur factorization of a complex general matrix.

2  Specification

SUBROUTINE F08QTF ( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO)
INTEGER  N, LDT, LDQ, IFST, ILST, INFO
COMPLEX (KIND=nag_wp)  T(LDT,*), Q(LDQ,*)
CHARACTER(1)  COMPQ
The routine may be called by its LAPACK name ztrexc.

3  Description

F08QTF (ZTREXC) reorders the Schur factorization of a complex general matrix A=QTQH, so that the diagonal element of T with row index IFST is moved to row ILST.
The reordered Schur form T~ is computed by a unitary similarity transformation: T~=ZHTZ. Optionally the updated matrix Q~ of Schur vectors is computed as Q~=QZ, giving A=Q~T~Q~H.

4  References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

5  Parameters

1:     COMPQ – CHARACTER(1)Input
On entry: indicates whether the matrix Q of Schur vectors is to be updated.
COMPQ='V'
The matrix Q of Schur vectors is updated.
COMPQ='N'
No Schur vectors are updated.
Constraint: COMPQ='V' or 'N'.
2:     N – INTEGERInput
On entry: n, the order of the matrix T.
Constraint: N0.
3:     TLDT* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array T must be at least max1,N.
On entry: the n by n upper triangular matrix T, as returned by F08PSF (ZHSEQR).
On exit: T is overwritten by the updated matrix T~.
4:     LDT – INTEGERInput
On entry: the first dimension of the array T as declared in the (sub)program from which F08QTF (ZTREXC) is called.
Constraint: LDT max1,N .
5:     QLDQ* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array Q must be at least max1,N if COMPQ='V' and at least 1 if COMPQ='N'.
On entry: if COMPQ='V', Q must contain the n by n unitary matrix Q of Schur vectors.
On exit: if COMPQ='V', Q contains the updated matrix of Schur vectors.
If COMPQ='N', Q is not referenced.
6:     LDQ – INTEGERInput
On entry: the first dimension of the array Q as declared in the (sub)program from which F08QTF (ZTREXC) is called.
Constraints:
  • if COMPQ='V', LDQ max1,N ;
  • if COMPQ='N', LDQ1.
7:     IFST – INTEGERInput
8:     ILST – INTEGERInput
On entry: IFST and ILST must specify the reordering of the diagonal elements of T. The element with row index IFST is moved to row ILST by a sequence of exchanges between adjacent elements.
Constraint: 1IFSTN and 1ILSTN.
9:     INFO – INTEGEROutput
On exit: INFO=0 unless the routine detects an error (see Section 6).

6  Error Indicators and Warnings

INFO<0
If INFO=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7  Accuracy

The computed matrix T~ is exactly similar to a matrix T+E, where
E2 = Oε T2 ,  
and ε is the machine precision.
The values of the eigenvalues are never changed by the reordering.

8  Parallelism and Performance

F08QTF (ZTREXC) is not threaded by NAG in any implementation.
F08QTF (ZTREXC) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9  Further Comments

The total number of real floating-point operations is approximately 20nr if COMPQ='N', and 40nr if COMPQ='V', where r=IFST-ILST.
The real analogue of this routine is F08QFF (DTREXC).

10  Example

This example reorders the Schur factorization of the matrix T so that element t11 is moved to t44, where
T = -6.00-7.00i 0.36-0.36i -0.19+0.48i 0.88-0.25i 0.00+0.00i -5.00+2.00i -0.03-0.72i -0.23+0.13i 0.00+0.00i 0.00+0.00i 8.00-1.00i 0.94+0.53i 0.00+0.00i 0.00+0.00i 0.00+0.00i 3.00-4.00i .  

10.1  Program Text

Program Text (f08qtfe.f90)

10.2  Program Data

Program Data (f08qtfe.d)

10.3  Program Results

Program Results (f08qtfe.r)


F08QTF (ZTREXC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015