NAG Library Routine Document

f06hqf (zsrotg)

1
Purpose

f06hqf generates a sequence of complex plane rotations.

2
Specification

Fortran Interface
Subroutine f06hqf ( pivot, direct, n, alpha, x, incx, c, s)
Integer, Intent (In):: n, incx
Real (Kind=nag_wp), Intent (Out):: c(n)
Complex (Kind=nag_wp), Intent (Inout):: alpha, x(*)
Complex (Kind=nag_wp), Intent (Out):: s(n)
Character (1), Intent (In):: pivot, direct
C Header Interface
#include <nagmk26.h>
void  f06hqf_ (const char *pivot, const char *direct, const Integer *n, Complex *alpha, Complex x[], const Integer *incx, double c[], Complex s[], const Charlen length_pivot, const Charlen length_direct)

3
Description

f06hqf generates the parameters of a complex unitary matrix P, of order n+1, chosen so as to set to zero the elements of a supplied n-element complex vector x.
If pivot='F' and direct='F', or if pivot='V' and direct='B',
P α x = β 0 ;  
If pivot='F' and direct='B', or if pivot='V' and direct='F',
P x α = 0 β .  
Here α and β are complex scalars.
P is represented as a sequence of n plane rotations Pk, as specified by pivot and direct; Pk is chosen to annihilate xk, and its 2 by 2 plane rotation part has the form
ck s-k -sk ck ,  
with ck real. The tangent of the rotation, tk, is overwritten on xk.

4
References

None.

5
Arguments

1:     pivot – Character(1)Input
On entry: specifies the plane rotated by Pk.
pivot='V' (variable pivot)
Pk rotates the k,k+1  plane.
pivot='F' (fixed pivot)
Pk rotates the 1,k+1  plane if direct='F', or the k,n+1  plane if direct='B'.
Constraint: pivot='V' or 'F'.
2:     direct – Character(1)Input
On entry: specifies the sequence direction.
direct='F' (forward sequence)
P=PnP2P1.
direct='B' (backward sequence)
P=P1P2Pn.
Constraint: direct='F' or 'B'.
3:     n – IntegerInput
On entry: n, the number of elements in x.
4:     alpha – Complex (Kind=nag_wp)Input/Output
On entry: the scalar α.
On exit: the scalar β.
5:     x* – Complex (Kind=nag_wp) arrayInput/Output
Note: the dimension of the array x must be at least max1, 1+n-1 ×incx .
On entry: the n-element vector x. xi must be stored in x1+i-1×incx, for i=1,2,,n.
Intermediate elements of x are not referenced.
On exit: the referenced elements are overwritten by details of the plane rotations.
6:     incx – IntegerInput
On entry: the increment in the subscripts of x between successive elements of x.
Constraint: incx>0.
7:     cn – Real (Kind=nag_wp) arrayOutput
On exit: the values ck, the cosines of the rotations.
8:     sn – Complex (Kind=nag_wp) arrayOutput
On exit: the values sk, the sines of the rotations.

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f06hqf is not threaded in any implementation.

9
Further Comments

None.

10
Example

None.