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.
F06QRF transforms an by real upper Hessenberg matrix to upper triangular form by applying an orthogonal matrix from the left or the right. is assumed to have nonzero subdiagonal elements , for , only. is formed as a sequence of plane rotations in planes to .
If , the rotations are applied from the left:
where .
If , the rotations are applied from the right:
where .
In either case, is a rotation in the plane, chosen to annihilate .
The by plane rotation part of has the form
4 References
None.
5 Parameters
1: – CHARACTER(1)Input
On entry: specifies whether is operated on from the left or the right.
is pre-multiplied from the left.
is post-multiplied from the right.
Constraint:
or .
2: – INTEGERInput
On entry: , the order of the matrix .
Constraint:
.
3: – INTEGERInput
4: – INTEGERInput
On entry: the values and .
If or or , an immediate return is effected.
5: – REAL (KIND=nag_wp) arrayOutput
On exit: holds , the cosine of the rotation , for .
6: – REAL (KIND=nag_wp) arrayInput/Output
On entry: the nonzero subdiagonal elements of :
must hold , for .
On exit: holds , the sine of the rotation , for .
7: – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array A
must be at least
.
On entry: the upper triangular part of the by upper Hessenberg matrix .
On exit: the upper triangular matrix .
8: – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F06QRF is called.