?hsein
?hsein
Computes selected eigenvectors of an upper Hessenberg matrix that correspond to specified eigenvalues.
Syntax
lapack_int LAPACKE_shsein
(
int
matrix_layout
,
char
side
,
char
eigsrc
,
char
initv
,
lapack_logical*
select
,
lapack_int
n
,
const float*
h
,
lapack_int
ldh
,
float*
wr
,
const float*
wi
,
float*
vl
,
lapack_int
ldvl
,
float*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
,
lapack_int*
ifaill
,
lapack_int*
ifailr
);
lapack_int LAPACKE_dhsein
(
int
matrix_layout
,
char
side
,
char
eigsrc
,
char
initv
,
lapack_logical*
select
,
lapack_int
n
,
const double*
h
,
lapack_int
ldh
,
double*
wr
,
const double*
wi
,
double*
vl
,
lapack_int
ldvl
,
double*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
,
lapack_int*
ifaill
,
lapack_int*
ifailr
);
lapack_int LAPACKE_chsein
(
int
matrix_layout
,
char
side
,
char
eigsrc
,
char
initv
,
const lapack_logical*
select
,
lapack_int
n
,
const lapack_complex_float*
h
,
lapack_int
ldh
,
lapack_complex_float*
w
,
lapack_complex_float*
vl
,
lapack_int
ldvl
,
lapack_complex_float*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
,
lapack_int*
ifaill
,
lapack_int*
ifailr
);
lapack_int LAPACKE_zhsein
(
int
matrix_layout
,
char
side
,
char
eigsrc
,
char
initv
,
const lapack_logical*
select
,
lapack_int
n
,
const lapack_complex_double*
h
,
lapack_int
ldh
,
lapack_complex_double*
w
,
lapack_complex_double*
vl
,
lapack_int
ldvl
,
lapack_complex_double*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
,
lapack_int*
ifaill
,
lapack_int*
ifailr
);
Include Files
- mkl.h
Description
The routine computes left and/or right eigenvectors of an upper Hessenberg matrix
H
, corresponding to selected eigenvalues.The right eigenvector and * (or **). Here denotes the conjugate of
x
and the left eigenvector y
, corresponding to an eigenvalue λ
, are defined by: H
*x
= λ
*x
y
H
H
= λ
*y
H
H
H
y
= λ
*
y
λ
*
λ
.The eigenvectors are computed by inverse iteration. They are scaled so that, for a real eigenvector | = 1, and for a complex eigenvector,
x
, max|x
i
max(|Re| + |Im|) = 1
.x
i
x
i
Input Parameters
- side
- Must be'R'or'L'or'B'.If, then only right eigenvectors are computed.side='R'If, then only left eigenvectors are computed.side='L'If, then all eigenvectors are computed.side='B'
- eigsrc
- Must be'Q'or'N'.If, then the eigenvalues ofeigsrc='Q'Hwere found using hseqr; thus ifHhas any zero sub-diagonal elements (and so is block triangular), then thej-th eigenvalue can be assumed to be an eigenvalue of the block containing thej-th row/column. This property allows the routine to perform inverse iteration on just one diagonal block. If, then no such assumption is made and the routine performs inverse iteration using the whole matrix.eigsrc='N'
- initv
- Must be'N'or'U'.If, then no initial estimates for the selected eigenvectors are supplied.initv='N'If, then initial estimates for the selected eigenvectors are supplied ininitv='U'vland/orvr.
- select
- Array, size at least max (1,n). Specifies which eigenvectors are to be computed.For real flavors:To obtain the real eigenvector corresponding to the real eigenvaluewr[j], setselect[j] to1To select the complex eigenvector corresponding to the complex eigenvalue(; the eigenvector corresponding to the first eigenvalue in the pair is computed.wr[j- 1],wi[j- 1]) with complex conjugate (wr[j],wi[j]), setselect[j- 1] and/orselect[j] to1For complex flavors:To select the eigenvector corresponding to the eigenvaluew[j], setselect[j] to1
- n
- The order of the matrixH().n≥0
- h,vl,vr
- Arrays:h(size max(1,Theldh*n))n-by-nupper Hessenberg matrixH. If anNANvalue is detected inh, the routine returns withinfo= -6.vl(size max(1,ldvl*mm) for column major layout and max(1,ldvl*n) for row major layout)Ifandinitv='V'orside='L''B', thenvlmust contain starting vectors for inverse iteration for the left eigenvectors. Each starting vector must be stored in the same column or columns as will be used to store the corresponding eigenvector.If, theninitv='N'vlneed not be set.The arrayvlis not referenced if.side='R'vr(size max(1,ldvr*mm) for column major layout and max(1,ldvr*n) for row major layout)Ifandinitv='V'orside='R''B', thenvrmust contain starting vectors for inverse iteration for the right eigenvectors. Each starting vector must be stored in the same column or columns as will be used to store the corresponding eigenvector.If, theninitv='N'vrneed not be set.The arrayvris not referenced if.side='L'
- ldh
- The leading dimension ofh; at least max(1,n).
- w
- Array, size at least max (1,n).Contains the eigenvalues of the matrixH.If, the array must be exactly as returned byeigsrc='Q'?hseqr.
- wr,wi
- Arrays, size at least max (1,n) each.Contain the real and imaginary parts, respectively, of the eigenvalues of the matrixH. Complex conjugate pairs of values must be stored in consecutive elements of the arrays. If, the arrays must be exactly as returned byeigsrc='Q'?hseqr.
- ldvl
- The leading dimension ofvl.Iforside='L''B',ldvl≥max(1,n)for column major layout and.ldvl≥max(1,mm) for row major layoutIf,side='R'.ldvl≥1
- ldvr
- The leading dimension ofvr.Iforside='R''B',ldvr≥max(1,n)for column major layout and.ldvr≥max(1,mm) for row major layoutIf,side='L'.ldvr≥1
- mm
- The number of columns invland/orvr.Must be at leastm, the actual number of columns required (seeOutput Parametersbelow).For real flavors,mis obtained by counting 1 for each selected real eigenvector and 2 for each selected complex eigenvector (seeselect).For complex flavors,mis the number of selected eigenvectors (seeselect).Constraint:0.≤mm≤n
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , the
info
= -i
i
-th parameter had an illegal value. If , then
info
> 0i
eigenvectors (as indicated by the parameters ifaill
and/or ifailr
above) failed to converge. The corresponding columns of vl
and/or vr
contain no useful information.Application Notes
Each computed right eigenvector , such that
x
i is the exact eigenvector of a nearby matrix A
+ E
i
|||| <
. Hence the residual is small: E
i
O
(ε
)||A
|||| - || =
.Ax
i
λ
i
x
i
O
(ε
)||A
||However, eigenvectors corresponding to close or coincident eigenvalues may not accurately span the relevant subspaces.
Similar remarks apply to computed left eigenvectors.