NAG FL Interface
f06tsf (zusqr)

1 Purpose

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

2 Specification

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

3 Description

f06tsf transforms an n by n complex upper spiked matrix H to upper triangular form R by applying a complex unitary matrix P from the left or the right. H is assumed to have real diagonal elements except where the spike joins the diagonal; R has real diagonal elements. P is formed as a sequence of plane rotations in planes k1 to k2.
If side='L', H is assumed to have a row spike, with nonzero elements hk2,k, for k=k1,,k2-1. The rotations are applied from the left:
PH=R ,  
where P = D Pk2-1 Pk1+1 Pk1 , Pk is a rotation in the k,k2 plane and D=diag1,,1,dk2,1,,1 with dk2=1.
If side='R', H is assumed to have a column spike, with nonzero elements hk+1,k1, for k=k1,,k2-1. The rotations are applied from the right:
HPH=R ,  
where P = D Pk1 Pk1+1 Pk2-1 , Pk is a rotation in the k1,k+1 plane and D=diag1,,1,dk1,1,,1 with dk1=1.
The 2 by 2 plane rotation part of Pk has the form
ck s¯k -sk ck  
with ck real.

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: s* Complex (Kind=nag_wp) array Input/Output
Note: the dimension of the array s must be at least k2.
On entry: the nonzero elements of the spike of H: sk must hold hk2,k if side='L', and hk+1,k1 if side='R', for k=k1,,k2-1.
On exit: sk holds sk, the sine of the rotation Pk, for k=k1,,k2-1; sk2 holds dk2, the k2th diagonal element of D, if side='L', or dk1, the k1th diagonal element of D, if side='R'.
7: alda* Complex (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 spiked matrix H. The imaginary parts of the diagonal elements must be zero, except for the k2,k2 element if side='L', or the k1,k1 element if side='R'.
On exit: the upper triangular matrix R. The imaginary parts of the diagonal elements are set to zero.
8: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06tsf is called.
Constraint: lda max1,n .

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f06tsf 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.