|
NAG[f08wec] NAG[nag_dgghrd] - Orthogonal reduction of a pair of real general matrices to generalized upper Hessenberg form
|
|
Calling Sequence
f08wec(compq, compz, ilo, ihi, a, b, q, z, 'n'=n, 'fail'=fail)
nag_dgghrd(. . .)
Parameters
|
compq - String;
|
|
|
On entry: specifies the form of the computed orthogonal matrix .
|
|
Do not compute .
|
|
The orthogonal matrix is returned.
|
|
Constraint: "Nag_NotQ", "Nag_InitQ" or "Nag_UpdateSchur". .
|
|
|
compz - String;
|
|
|
On entry: specifies the form of the computed orthogonal matrix .
|
|
Do not compute .
|
|
The orthogonal matrix is returned.
|
|
Constraint: "Nag_NotZ", "Nag_InitZ" or "Nag_UpdateZ". .
|
|
|
ilo - integer;
ihi - integer;
|
|
|
if , ;
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=float[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=float[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=float[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 an orthogonal matrix .
|
|
If , q is not referenced.
|
|
On exit: if , q contains the orthogonal matrix .
|
|
Iif , q is overwritten by .
|
|
|
z - Matrix(1..dim1, 1..dim2, datatype=float[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 an orthogonal matrix .
|
|
If , z is not referenced.
|
|
On exit: if , z contains the orthogonal matrix .
|
|
If , z is overwritten by .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the array z.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dgghrd (f08wec) reduces a pair of real matrices , where is upper triangular, to the generalized upper Hessenberg form using orthogonal 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 orthogonal transformations which are backward stable.
|
|
Further Comments
|
|
This function is usually followed by f08xec (nag_dhgeqz) which implements the algorithm for computing generalized eigenvalues of a reduced pair of matrices.
The complex analogue of this function is f08wsc (nag_zgghrd).
|
|
|
Examples
|
|
>
|
compq := "Nag_NotQ":
compz := "Nag_NotZ":
n := 5:
ilo := 1:
ihi := 5:
a := Matrix([[-2.189810707792021, -3.860243234889781, -0.7832784454794537, -1.868357725686654, -5.398725629594945], [-0.6852853888947079, -3.288784152686995, -1.438693822365931, -6.499961199366684, -30.43126686913852], [-0.4675345497569942, -0.9460296237838147, 0.05890247520307763, 1.68772079635865, 11.83388168132396], [0.1275112017793676, 0.08562118570231017, -0.08916578356814751, -0.5024032653213368, -1.524287626980205], [-0.01628919921740115, 0.0108594661449348, 0.01466027929566115, 0.03366434504929487, -0.05049651757395134]], datatype=float[8]):
b := Matrix([[-1.424780684877501, -4.604217385613993, -1.088588592238918, -2.347027886812987, -4.825304043612226], [0.4124084319199036, -3.498740096950594, -2.422558190366834, -9.651981131278539, -28.51976667786654], [0.04124084319199037, 0.1104973584069892, 0.6928828841397811, 3.972051174738771, 13.55775258164351], [0.04124084319199037, 0.2780329357492619, 0.015085691276236, 0.3071315763993982, 1.792521439103921], [0.04124084319199037, 0.6131040904338072, -0.8759673660952852, 0.1236241913362016, 0.03257839843480646]], datatype=float[8]):
q := Matrix([[0]], datatype=float[8]):
z := Matrix([[0]], datatype=float[8]):
NAG:-f08wec(compq, compz, ilo, ihi, a, b, q, z, 'n' = n):
|


|
|
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.
|
|