|
NAG[f08pxc] NAG[nag_zhsein] - Selected right and/or left eigenvectors of complex upper Hessenberg matrix by inverse iteration
|
|
Calling Sequence
f08pxc(side, eig_source, initv, select, h, w, vl, vr, m, ifaill, ifailr, 'n'=n, 'mm'=mm, 'fail'=fail)
nag_zhsein(. . .)
Parameters
|
side - String;
|
|
|
On entry: indicates whether left and/or right eigenvectors are to be computed.
|
|
Only right eigenvectors are computed.
|
|
Only left eigenvectors are computed.
|
|
Both left and right eigenvectors are computed.
|
|
Constraint: "Nag_RightSide", "Nag_LeftSide" or "Nag_BothSides". .
|
|
|
eig_source - String;
|
|
|
On entry: indicates whether the eigenvalues of (stored in w) were found using f08psc (nag_zhseqr).
|
|
No such assumption is made and the function performs inverse iteration using the whole matrix.
|
|
Constraint: "Nag_HSEQRSource" or "Nag_NotKnown". .
|
|
|
initv - String;
|
|
|
On entry: indicates whether you are supplying initial estimates for the selected eigenvectors.
|
|
No initial estimates are supplied.
|
|
Initial estimates are supplied in vl and/or vr.
|
|
Constraint: "Nag_NoVec" or "Nag_UserVec". .
|
|
|
select - Vector(1..dim, datatype=boolean);
|
|
|
Note: the dimension, dim, of the array select must be at least .
|
|
On entry: specifies which eigenvectors are to be computed. To select the eigenvector corresponding to the eigenvalue , must be set to true.
|
|
|
h - 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.
|
|
|
w - Vector(1..dim, datatype=complex[8]);
|
|
|
Note: the dimension, dim, of the array w must be at least .
|
|
On entry: the eigenvalues of the matrix . If , the array must be exactly as returned by f08psc (nag_zhseqr).
|
|
On exit: the real parts of some elements of w may be modified, as close eigenvalues are perturbed slightly in searching for independent eigenvectors.
|
|
|
vl - 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.
|
|
If , vl need not be set.
|
|
On exit: if "Nag_LeftSide" or "Nag_BothSides", vl contains the computed left eigenvectors (as specified by select). The eigenvectors are stored consecutively in the rows or columns of the array (depending on the value of storage order), in the same order as their eigenvalues.
|
|
If , vl is not referenced.
|
|
|
vr - 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.
|
|
If , vr need not be set.
|
|
On exit: if "Nag_RightSide" or "Nag_BothSides", vr contains the computed right eigenvectors (as specified by select). The eigenvectors are stored consecutively in the rows or columns of the array (depending on the value of storage order), in the same order as their eigenvalues.
|
|
If , vr is not referenced.
|
|
|
m - assignable;
|
|
|
Note: On exit the variable m will have a value of type integer.
|
|
On exit: , the number of selected eigenvectors.
|
|
|
ifaill - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array ifaill must be at least
|
|
when .
|
|
If , ifaill is not referenced.
|
|
|
ifailr - Vector(1..dim, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the dimension, dim, of the array ifailr must be at least
|
|
when .
|
|
If , ifailr is not referenced.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array h.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'mm'=mm - integer; (optional)
|
|
|
Default value: the second dimension of the arrays vl, vr.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_zhsein (f08pxc) computes selected left and/or right eigenvectors of a complex upper Hessenberg matrix corresponding to specified eigenvalues, by inverse iteration.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_CONVERGENCE"
eigenvectors (as indicated by arguments ifaill and/or ifailr) failed to converge. The corresponding columns of vl and/or vr contain no useful information.
"NE_INT"
On entry, . Constraint: , where is the number of selected eigenvectors.
On entry, . Constraint: .
"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
|
|
Each computed right eigenvector is the exact eigenvector of a nearby matrix , such that . Hence the residual is small:
However, eigenvectors corresponding to close or coincident eigenvalues may not accurately span the relevant subspaces.
Similar remarks apply to computed left eigenvectors.
|
|
|
Examples
|
|
>
|
Digits := 16:
side := "Nag_RightSide":
eig_source := "Nag_HSEQRSource":
initv := "Nag_NoVec":
n := 4:
mm := 4:
selector := Vector([true, true, false, false], datatype=boolean):
h := Matrix([[-3.97 -5.04*I , -1.131805187339771 -2.56930489882744*I , -4.602742437533554 -0.142631904083292*I , -1.424912289366528 +1.732983703342187*I ], [-5.479653273702635 +0*I , 1.858472820765587 -1.55018070644029*I , 4.414465526917013 -0.7638237115550982*I , -0.4805261336990153 -1.197599997332747*I ], [0.6932222118146283 -0.4828752762602551*I , 6.267276818064224 +0*I , -0.4503809403345019 -0.02898183259817936*I , -1.346684450078735 +1.65792489538873*I ], [-0.2112946907920694 +0.0864412259893682*I , 0.1242146188766495 -0.2289276049796828*I , -3.499985837393259 +0*I , 2.561908119568915 -3.370837460961531*I ]], datatype=complex[8]):
h_orig := copy(h):
w := Vector([-6.000425342949241 -6.999843371570387*I, -5.000033457596968 +2.006027162316514*I, 7.998194516208243 -0.9963650913929004*I, 3.002264284337973 -3.999818699353225*I], datatype=complex[8]):
vl := Matrix([[0 +0*I ]], datatype=complex[8]):
vr := Matrix([[0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ]], datatype=complex[8]):
ifaill := Vector(1, datatype=integer[kernelopts('wordsize')/8]):
ifailr := Vector(4, datatype=integer[kernelopts('wordsize')/8]):
NAG:-f08pxc(side, eig_source, initv, selector, h, w, vl, vr, m, ifaill, ifailr, 'n' = n, 'mm' = mm):
|
|
|