NAG Library Routine Document

f06qtf (dutsqr)

1
Purpose

f06qtf performs a QR or RQ factorization of the product of a real upper triangular matrix and a real matrix of plane rotations.

2
Specification

Fortran Interface
Subroutine f06qtf ( side, n, k1, k2, c, s, a, lda)
Integer, Intent (In):: n, k1, k2, lda
Real (Kind=nag_wp), Intent (Inout):: c(*), s(*), a(lda,*)
Character (1), Intent (In):: side
C Header Interface
#include <nagmk26.h>
void  f06qtf_ (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)

3
Description

f06qtf performs one of the transformations
RPUQT   or   RQUPT ,  
where U is a given n by n real upper triangular matrix, P is a given real orthogonal matrix, and Q is a real orthogonal matrix chosen to make R upper triangular. Both P and Q are represented as sequences of plane rotations in planes k1 to k2.
If side='L',
RPUQT ,  
where P= Pk2-1 Pk1+1 Pk1  and Q= Qk2-1 Qk1+1 Qk1 .
If side='R',
RQUPT ,  
where P=Pk1 Pk1+1 Pk2-1  and Q= Qk1 Qk1+1 Qk2-1 .
In either case Pk and Qk are rotations in the k,k+1 plane.
The 2 by 2 rotation part of Pk or Qk has the form
ck sk -sk ck .  

4
References

None.

5
Arguments

1:     side – Character(1)Input
On entry: specifies whether P is applied from the left or the right in the transformation.
side='L'
P is applied from the left.
side='R'
P is applied from the right.
Constraint: side='L' or 'R'.
2:     n – IntegerInput
On entry: n, the order of the matrices U and R.
Constraint: n0.
3:     k1 – IntegerInput
4:     k2 – IntegerInput
On entry: the values k1 and k2.
If k1<1 or k2k1 or k2>n, an immediate return is effected.
5:     c* – Real (Kind=nag_wp) arrayInput/Output
Note: the dimension of the array c must be at least k2-1.
On entry: ck must hold the cosine of the rotation Pk, for k=k1,,k2-1.
On exit: ck holds the cosine of the rotation Qk, for k=k1,,k2-1.
6:     s* – Real (Kind=nag_wp) arrayInput/Output
Note: the dimension of the array s must be at least k2-1.
On entry: sk must hold the sine of the rotation Pk, for k=k1,,k2-1.
On exit: sk holds the sine of the rotation Qk, for k=k1,,k2-1.
7:     alda* – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a must be at least n.
On entry: the n by n upper triangular matrix U.
On exit: the upper triangular matrix R.
8:     lda – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f06qtf is called.
Constraint: lda max1,n .

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f06qtf is not threaded in any implementation.

9
Further Comments

None.

10
Example

None.