|
NAG[f08wsc] NAG[nag_zgghrd] - Unitary reduction of a pair of complex general matrices to generalized upper Hessenberg form
|
|
Calling Sequence
f08wsc(compq, compz, n, ilo, ihi, a, b, q, z, 'fail'=fail)
nag_zgghrd(. . .)
Parameters
|
compq - String;
|
|
|
On entry: specifies the form of the computed unitary matrix .
|
|
Do not compute .
|
|
The unitary matrix is returned.
|
|
Constraint: "Nag_NotQ", "Nag_InitQ" or "Nag_UpdateSchur". .
|
|
|
compz - String;
|
|
|
On entry: specifies the form of the computed unitary matrix .
|
|
Do not compute .
|
|
The unitary matrix is returned.
|
|
Constraint: "Nag_NotZ", "Nag_InitZ" or "Nag_UpdateZ". .
|
|
|
n - integer;
|
|
|
Constraint: . .
|
|
|
ilo - integer;
ihi - integer;
|
|
|
if , ;
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On exit: is overwritten by the upper Hessenberg matrix .
|
|
|
b - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On exit: the array b is overwritten by the upper triangular matrix .
|
|
|
q - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On entry: if , q must contain a unitary matrix .
|
|
If , q is not referenced.
|
|
On exit: if , q contains the unitary matrix .
|
|
Iif , q is overwritten by .
|
|
|
z - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On entry: if , z must contain a unitary matrix .
|
|
If , z is not referenced.
|
|
On exit: if , z contains the unitary matrix .
|
|
If , z is overwritten by .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_zgghrd (f08wsc) reduces a pair of complex matrices , where is upper triangular, to the generalized upper Hessenberg form using unitary transformations.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
"NE_INT_3"
On entry, , , . Constraint: if , and .
On entry, , , . Constraint: if , .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
The reduction to the generalized Hessenberg form is implemented using unitary transformations which are backward stable.
|
|
Further Comments
|
|
This function is usually followed by f08xsc (nag_zhgeqz) which implements the algorithm for computing generalized eigenvalues of a reduced pair of matrices.
The real analogue of this function is f08wec (nag_dgghrd).
|
|
|
Examples
|
|
>
|
compq := "Nag_NotQ":
compz := "Nag_NotZ":
n := 4:
ilo := 1:
ihi := 4:
a := Matrix([[-2.867890104378766 -1.594524360587801*I , -4.687788932894172 -1.335343722471056*I , -0.7905009462560725 +0.07944449994448058*I , -1.439015977717754 +0.8017696696524528*I ], [-2.515655332627996 +0.5597332416374018*I , -4.543587844404469 +0.03162421545477236*I , -0.9404703494183806 -0.1305718159625312*I , -2.391088344496183 -0.5474958021881112*I ], [0.9137894874444604 -0.09397719654058648*I , 1.001627625946434 +0.1053096496371167*I , -0.09620027967881147 +0.03545150990580874*I , -1.284793228244642 +0.04644135395523489*I ], [-0.08371480021894684 +0.004924400012879077*I , -0.0426781334449532 -0.01149026669671836*I , 0.0233909000611764 -0.002215980005795651*I , 0.09323530691051354 -0.0001641466670958877*I ]], datatype=complex[8]):
b := Matrix([[-1.774823934929885 +0*I , -4.744132549876073 +0.8845947866158473*I , -0.918964392974807 +0.3876440848354796*I , -1.548322594662642 +1.005733563126935*I ], [0.3603832255487836 +0.3603832255487836*I , -2.271717062641916 +0*I , -0.8105776924797566 -0.1026200900444423*I , -2.074151659012492 -0.4057262470104193*I ], [0.03603832255487836 +0.07207664510975673*I , 0.1493318102558879 -0.03084332363005017*I , -0.3174420096804637 +0*I , -1.435800103589889 -0.02051468561236519*I ], [0.03603832255487836 +0.1081149676646351*I , 0.3578350975272399 -0.04233510073426493*I , 0.9002179361271463 -0.07846747522359941*I , -0.0428422801120493 +0*I ]], datatype=complex[8]):
q := Matrix([[0 +0*I ]], datatype=complex[8]):
z := Matrix([[0 +0*I ]], datatype=complex[8]):
NAG:-f08wsc(compq, compz, n, ilo, ihi, a, b, q, z):
|


|
|
See Also
|
|
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256
f08 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|