(C|Z)UNGTR

Single complex and double complex UNGTR.

Description

Generates an orthonormal matrix given a set of elementary reflectors and scale factors.

Q = H_1 \mult H_2 \mult \dots \mult H_K

The elementary reflectors and scale factors are expected in the same form as generated by HETRD.

When UPLO is U:

Q = H_{N-1} \mult \dots \mult H_2 \mult H_1

H_i = I - \tau_i \mult v \mult \herm{v}

The vector v has components i+1 through n of zero, component i is 1, and components 1 through i-1 are stored in the columns of A above the superdiagonal.

When UPLO is L:

Q = H_1 \mult H_2 \mult \dots \mult H_{N-1}

H_i = I - \tau_i \mult v \mult \herm{v}

The vector v has components 1 through i of zero, component i+1 is 1, and components i+2 through N are stored in the columns of A below the subdiagonal.

LAPACK Interface

void cungtr(const char *UPLO, const qml_long *N, qml_single_complex *A,
    const qml_long *LDA, qml_single_complex *TAU,
    qml_single_complex *WORK, const qml_long *LWORK, qml_long *INFO);

void zungtr(const char *UPLO, const qml_long *N, qml_double_complex *A,
    const qml_long *LDA, qml_double_complex *TAU,
    qml_double_complex *WORK, const qml_long *LWORK, qml_long *INFO);

Arguments

UPLO Store upper ‘U’ or lower ‘L’ triangular part of A
N Number of rows and columns of A
A Elementary reflector vectors, overwritten with Q on exit
LDA Leading dimension of A
TAU Array of scale factors for reflectors
WORK Work space of size at least LWORK
LWORK Size of work space (-1 to query)
INFO 0 on success