XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ zungtr()

void zungtr ( char  uplo,
int  n,
int  lda,
doublecomplex  a[],
doublecomplex  tau[],
doublecomplex  work[],
int  lwork,
int *  info 
)

Generates a transform matrix from a complex Hermitian matrix to tridiagonal form

Purpose
This routine generates a complex unitary matrix Q which is defined as the product of n - 1 elementary reflectors of order n, as returned by zhetrd.
If uplo = 'U', Q = H(n-1) . . . H(2) H(1).
If uplo = 'L', Q = H(1) H(2) . . . H(n-1).
Parameters
[in]uplo= 'U': Upper triangle of a[][] contains elementary reflectors from zhetrd.
= 'L': Lower triangle of a[][] contains elementary reflectors from zhetrd.
[in]nOrder of the matrix Q. (n >= 0) (If n = 0, returns without computation)
[in]ldaLeading dimension of the two dimensional array a[][]. (lda >= max(1, n))
[in,out]a[][]Array a[la][lda] (la >= n)
[in] The vectors which define the elementary reflectors, as returned by zhetrd.
[out] The n x n unitary matrix Q.
[in]tau[]Array tau[ltau] (ltau >= n - 1)
tau[i] must contain the scalar factor of the elementary reflector H(i), as returned by zhetrd.
[out]work[]Array work[lwork]
Work array.
On exit, if info = 0, work[0] returns the optimal lwork.
[in]lworkThe size of work[]. (lwork >= max(1, n-1))
For optimum performance lwork >= (n-1)*nb, where nb is the optimal blocksize.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] array, and returns the value in work[0].
[out]info= 0: Successful exit.
= -1: The argument uplo had an illegal value. (uplo != 'U' nor 'L')
= -2: The argument n had an illegal value. (n < 0)
= -3: The argument lda had an illegal value. (lda < max(1, n))
= -7: The argument lwork had an illegal value. (lwork too small)
Reference
LAPACK