NAG FL Interface
f06twf (zutsrs)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f06twf transforms a complex upper triangular matrix to an upper spiked matrix by applying a given sequence of plane rotations.

2 Specification

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

3 Description

f06twf transforms an n×n complex upper triangular matrix U with real diagonal elements, to an upper spiked matrix H, by applying a given sequence of plane rotations from either the left or the right, in planes k1 to k2. H has real diagonal elements except where the spike joins the diagonal.
If side='L', H has a row spike, with nonzero elements h k2,k , for k = k1 , k1+1, , k2-1 . The rotations are applied from the left:
H=PU ,  
where P = Pk1 Pk1+1 Pk2-1 and Pk is a rotation in the (k,k2) plane.
If side='R', H has a column spike, with nonzero elements h k+1, k1 , for k= k1, k1+1, , k2-1 . The rotations are applied from the right:
HPH = R ,  
where P = Pk2-1 Pk1+1 Pk1 and Pk is a rotation in the (k1,k+1) plane.
The 2×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 U is operated on from the left or the right.
side='L'
U is pre-multiplied from the left.
side='R'
U is post-multiplied from the right.
Constraint: side='L' or 'R'.
2: n Integer Input
On entry: n, the order of the matrices U and 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: c(*) Real (Kind=nag_wp) array Input
Note: the dimension of the array c must be at least k2-1.
On entry: c(k) must hold 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-1.
On entry: s(k) must hold sk, the sine of the rotation Pk, for k=k1,,k2-1.
On exit: s(k) holds a nonzero element of the spike of H: hk2,k if side='L', or hk+1,k1 if side='R', for k=k1,,k2-1.
7: a(lda,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array a must be at least n.
On entry: the n×n upper triangular matrix U. The imaginary parts of the diagonal elements must be zero.
On exit: the upper triangular part of the upper spiked matrix H. The imaginary parts of the diagonal elements are set to zero except for the (k2,k2) element if side='L', or the (k1,k1) element if side='R'.
8: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06twf is called.
Constraint: lda max(1,n) .

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f06twf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.