XLPack 6.1
Excel VBA Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ Zgehrd()

Sub Zgehrd ( N As  Long,
Ilo As  Long,
Ihi As  Long,
A() As  Complex,
Tau() As  Complex,
Info As  Long 
)

Reduces a complex general matrix to upper Hessenberg form

Purpose
This routine reduces a complex general matrix A to upper Hessenberg form H by an unitary similarity transformation: Q^H * A * Q = H.
Parameters
[in]NOrder of the matrix A. (N >= 0) (If N = 0, returns without computation)
[in]Ilo
[in]IhiIt is assumed that A is already upper triangular in rows and columns 1〜Ilo-1 and Ihi+1〜N. Ilo and Ihi are normally set by a previous call to Dgebal. Otherwise they should be set to 1 and N respectively. See Further Details. (1 <= Ilo <= Ihi <= N, if N > 0. Ilo = 1 and Ihi = 0, if N = 0)
[in,out]A()Array A(LA1 - 1, LA2 - 1) (LA1 >= N, LA2 >= N)
[in] N x N general matrix to be reduced.
[out] The upper triangle and the first subdiagonal of A() are overwritten with the upper Hessenberg matrix H, and the elements below the first subdiagonal, with the array Tau(), represent the unitary matrix Q as a product of elementary reflectors. See Further Details.
[out]Tau()Array Tau(LTau - 1) (LTau >= N - 1)
The scalar factors of the elementary reflectors (see Further Details). Elements 1〜Ilo-1 and Ihi〜N-1 of Tau() are set to zero.
[out]Info= 0: Successful exit.
= -1: The argument N had an illegal value. (N < 0)
= -2: The argument Ilo had an illegal value. (Ilo < 1 or Ilo > N)
= -3: The argument Ihi had an illegal value. (Ihi < min(Ilo, N) or Ihi > N)
= -4: The argument A() is invalid.
= -5: The argument Tau() is invalid.
Further Details
The matrix Q is represented as a product of (Ihi-Ilo) elementary reflectors
Q = H(Ilo) H(Ilo+1) . . . H(Ihi-1).
Each H(i) has the form
H(i) = I - tau * v * v^H
where tau is a complex scalar, and v is a complex vector with v(1〜i) = 0, v(i+1) = 1 and v(Ihi+1〜N) = 0, v(i+2〜Ihi) is stored on exit in A(i+2〜Ihi, i), and tau in Tau(i - 1).

The contents of A are illustrated by the following example, with N = 7, Ilo = 2 and Ihi = 6:
on entry, on exit,
( a a a a a a a ) ( a a h h h h a )
( a a a a a a ) ( a h h h h a )
( a a a a a a ) ( h h h h h h )
( a a a a a a ) ( v2 h h h h h )
( a a a a a a ) ( v2 v3 h h h h )
( a a a a a a ) ( v2 v3 v4 h h h )
( a ) ( a )
where a denotes an element of the original matrix A, h denotes a modified element of the upper Hessenberg matrix H, and vi denotes an element of the vector defining H(i).

This routine is a slight modification of LAPACK-3.0's ZGEHRD subroutine incorporating improvements proposed by Quintana-Orti and Van de Geijn (2006). (See ZLAHR2.)
Reference
LAPACK
Example Program
See examples of Zhseqr, Ztrevc3 and Zhsein.