F06FQF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F06FQF

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.

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1  Purpose

F06FQF generates a sequence of real plane rotations.

2  Specification

SUBROUTINE F06FQF ( PIVOT, DIRECT, N, ALPHA, X, INCX, C, S)
INTEGER  N, INCX
REAL (KIND=nag_wp)  ALPHA, X(*), C(N), S(N)
CHARACTER(1)  PIVOT, DIRECT

3  Description

F06FQF generates the parameters of a real orthogonal matrix P, of order n+1, chosen so as to set to zero the elements of a supplied n-element real 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 real 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 sk -sk ck .  
The tangent of the rotation, tk, is overwritten on xk.

4  References

None.

5  Parameters

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 – REAL (KIND=nag_wp)Input/Output
On entry: the scalar α.
On exit: the scalar β.
5:     X* – REAL (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 sequence of 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 – REAL (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

Not applicable.

9  Further Comments

None.

10  Example

None.

F06FQF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015