NAG Library Routine Document

f06hrf  (zhousg)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1
Purpose

f06hrf generates a complex elementary reflection.

2
Specification

Fortran Interface
Subroutine f06hrf ( n, alpha, x, incx, tol, theta)
Integer, Intent (In):: n, incx
Real (Kind=nag_wp), Intent (In):: tol
Complex (Kind=nag_wp), Intent (Inout):: alpha, x(*)
Complex (Kind=nag_wp), Intent (Out):: theta
C Header Interface
#include nagmk26.h
void  f06hrf_ ( const Integer *n, Complex *alpha, Complex x[], const Integer *incx, const double *tol, Complex *theta)

3
Description

f06hrf generates details of a complex elementary reflection (Householder matrix), P, such that
P α x = β 0  
where P is unitary, α is a complex scalar, β is a real scalar, and x is an n-element complex vector.
P is given in the form
P=I-γ ζ z ζ zH ,  
where z is an n-element complex vector, γ is a complex scalar such that Reγ=1, and ζ is a real scalar. γ and ζ are returned in a single complex value θ=ζ,Imγ. Thus ζ=Reθ and γ=1,Imθ.
If x is such that
maxRexi,Imximaxtol,εmaxReα,Imα,  
where ε is the machine precision and tol is a user-supplied tolerance, then:
Otherwise 1Reθ2.

4
References

None.

5
Arguments

1:     n – IntegerInput
On entry: n, the number of elements in x and z.
2:     alpha – Complex (Kind=nag_wp)Input/Output
On entry: the scalar α.
On exit: the scalar β.
3:     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 complex elementary reflection.
4:     incx – IntegerInput
On entry: the increment in the subscripts of x between successive elements of x.
Constraint: incx>0.
5:     tol – Real (Kind=nag_wp)Input
On entry: the value tol.
6:     theta – Complex (Kind=nag_wp)Output
On exit: the scalar θ.

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f06hrf 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.
© The Numerical Algorithms Group Ltd, Oxford, UK. 2017