NAG FL Interface
f06qrf (duhqr)

1 Purpose

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

2 Specification

Fortran Interface
Subroutine f06qrf ( side, n, k1, k2, c, s, a, lda)
Integer, Intent (In) :: n, k1, k2, lda
Real (Kind=nag_wp), Intent (Inout) :: c(k2-1), s(k2-1), a(lda,*)
Character (1), Intent (In) :: side
C Header Interface
#include <nag.h>
void  f06qrf_ (const char *side, const Integer *n, const Integer *k1, const Integer *k2, double c[], double s[], double a[], const Integer *lda, const Charlen length_side)
The routine may be called by the names f06qrf or nagf_blas_duhqr.

3 Description

f06qrf transforms an n by n real upper Hessenberg matrix H to upper triangular form R by applying an orthogonal matrix P from the left or the right. H is assumed to have nonzero subdiagonal elements hk+1,k, for k=k1,,k2-1, only. 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 = P k2-1 P k1+1 P k1 .
If side='R', the rotations are applied from the right:
HPT=R ,  
where P = Pk1 Pk1+1 Pk2-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
ck sk -sk ck .  

4 References

None.

5 Arguments

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 Integer Input
On entry: n, the order of the matrix H.
Constraint: n0.
3: k1 Integer Input
4: k2 Integer Input
On entry: the values k1 and k2.
If k1<1 or k2k1 or k2>n, an immediate return is effected.
5: ck2-1 Real (Kind=nag_wp) array Output
On exit: ck holds ck, the cosine of the rotation Pk, for k=k1,,k2-1.
6: sk2-1 Real (Kind=nag_wp) array Input/Output
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* Real (Kind=nag_wp) array Input/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.
8: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06qrf is called.
Constraint: lda max1,n .

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f06qrf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.