F06TRF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F06TRF

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
    10  Example

1  Purpose

F06TRF performs a QR or RQ factorization (as a sequence of plane rotations) of a complex upper Hessenberg matrix.

2  Specification

SUBROUTINE F06TRF ( SIDE, N, K1, K2, C, S, A, LDA)
INTEGER  N, K1, K2, LDA
REAL (KIND=nag_wp)  S(*)
COMPLEX (KIND=nag_wp)  C(K2), A(LDA,*)
CHARACTER(1)  SIDE

3  Description

F06TRF transforms an n by n complex upper Hessenberg matrix H to upper triangular form R by applying a unitary matrix P from the left or the right. H is assumed to have real nonzero subdiagonal elements hk+1,k, for k=k1,,k2-1, only; R has real diagonal elements. P is formed as a sequence of plane rotations in planes k1 to k2.
If SIDE='L', the rotations are applied from the left:
PH=R ,  
where P = D P k2-1 P k1+1 P k1  and D = diag 1,,1 , dk2 , 1,,1  with dk2=1.
If SIDE='R', the rotations are applied from the right:
HPH=R ,  
where P = D Pk1 Pk1+1 Pk2-1  and D = diag1,,1,dk1,1,,1  with dk1=1.
In either case, Pk is a rotation in the k,k+1 plane, chosen to annihilate hk+1,k.
The 2 by 2 plane rotation part of Pk has the form
c-k sk -sk ck  
with sk real.

4  References

None.

5  Parameters

1:     SIDE – CHARACTER(1)Input
On entry: specifies whether H is operated on from the left or the right.
SIDE='L'
H is pre-multiplied from the left.
SIDE='R'
H is post-multiplied from the right.
Constraint: SIDE='L' or 'R'.
2:     N – INTEGERInput
On entry: n, the order of the matrix H.
Constraint: N0.
3:     K1 – INTEGERInput
4:     K2 – INTEGERInput
On entry: the dimension of the array C as declared in the (sub)program from which F06TRF is called. The values k1 and k2.
If K1<1 or K2K1 or K2>N, an immediate return is effected.
5:     CK2 – COMPLEX (KIND=nag_wp) arrayOutput
On exit: Ck holds ck, the cosine of the rotation Pk, for k=k1,,k2-1; Ck2 holds dk2, the k2th diagonal element of D, if SIDE='L', or dk1, the k1th diagonal element of D, if SIDE='R'.
6:     S* – REAL (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array S must be at least K2-K1.
On entry: the nonzero subdiagonal elements of H: Sk must hold hk+1,k, for k=k1,,k2-1.
On exit: Sk holds sk, the sine of the rotation Pk, for k=k1,,k2-1.
7:     ALDA* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array A must be at least N.
On entry: the upper triangular part of the n by n upper Hessenberg matrix H.
On exit: the upper triangular matrix R. The imaginary parts of the diagonal elements are set to zero.
8:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06TRF is called.
Constraint: LDA max1,N .

6  Error Indicators and Warnings

None.

7  Accuracy

Not applicable.

8  Parallelism and Performance

F06TRF is not threaded by NAG in any implementation.
F06TRF 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

None.

10  Example

None.

F06TRF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

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