naginterfaces.library.blas.zuhqr

naginterfaces.library.blas.zuhqr(side, k1, k2, s, a)[source]

zuhqr performs a or factorization (as a sequence of plane rotations) of a complex upper Hessenberg matrix.

For full information please refer to the NAG Library document for f06tr

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f06/f06trf.html

Parameters
sidestr, length 1

Specifies whether is operated on from the left or the right.

is pre-multiplied from the left.

is post-multiplied from the right.

k1int

The value .

k2int

The value .

sfloat, array-like, shape

The nonzero subdiagonal elements of : must hold , for .

acomplex, array-like, shape

The upper triangular part of the upper Hessenberg matrix .

Returns
ccomplex, ndarray, shape

holds , the cosine of the rotation , for ; holds , the th diagonal element of , if , or , the th diagonal element of , if .

sfloat, ndarray, shape

holds , the sine of the rotation , for .

acomplex, ndarray, shape

The upper triangular matrix . The imaginary parts of the diagonal elements are set to zero.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: or .

(errno )

On entry, error in parameter .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

zuhqr transforms an complex upper Hessenberg matrix to upper triangular form by applying a unitary matrix from the left or the right. is assumed to have real nonzero subdiagonal elements , for , only; has real diagonal elements. is formed as a sequence of plane rotations in planes to .

If , the rotations are applied from the left:

where and with .

If , the rotations are applied from the right:

where and with .

In either case, is a rotation in the plane, chosen to annihilate .

The plane rotation part of has the form

with real.