?hbevx
?hbevx
Computes selected eigenvalues and, optionally, eigenvectors of a Hermitian band matrix.
Syntax
lapack_int LAPACKE_chbevx
(
int
matrix_layout
,
char
jobz
,
char
range
,
char
uplo
,
lapack_int
n
,
lapack_int
kd
,
lapack_complex_float*
ab
,
lapack_int
ldab
,
lapack_complex_float*
q
,
lapack_int
ldq
,
float
vl
,
float
vu
,
lapack_int
il
,
lapack_int
iu
,
float
abstol
,
lapack_int*
m
,
float*
w
,
lapack_complex_float*
z
,
lapack_int
ldz
,
lapack_int*
ifail
);
lapack_int LAPACKE_zhbevx
(
int
matrix_layout
,
char
jobz
,
char
range
,
char
uplo
,
lapack_int
n
,
lapack_int
kd
,
lapack_complex_double*
ab
,
lapack_int
ldab
,
lapack_complex_double*
q
,
lapack_int
ldq
,
double
vl
,
double
vu
,
lapack_int
il
,
lapack_int
iu
,
double
abstol
,
lapack_int*
m
,
double*
w
,
lapack_complex_double*
z
,
lapack_int
ldz
,
lapack_int*
ifail
);
Include Files
- mkl.h
Description
The routine computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian band matrix
A
. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- jobz
- Must be'N'or'V'.If, then only eigenvalues are computed.job='N'If, then eigenvalues and eigenvectors are computed.job='V'
- range
- Must be'A'or'V'or'I'.If, the routine computes all eigenvalues.range='A'If, the routine computes eigenvaluesrange='V'in the half-open interval:w[i]vl<w[i].≤vuIf, the routine computes eigenvalues with indicesrange='I'iltoiu.
- uplo
- Must be'U'or'L'.If,uplo='U'abstores the upper triangular part ofA.If,uplo='L'abstores the lower triangular part ofA.
- n
- The order of the matrixA().n≥0
- kd
- The number of super- or sub-diagonals inA().kd≥0
- ab
- ab(size at least max(1,is an array containing either upper or lower triangular part of the Hermitian matrixldab*n) for column major layout and at least max(1,ldab*(kd+ 1)) for row major layout)A(as specified byuplo) in band storage format.
- ldab
- The leading dimension ofab; must be at leastkd+1for column major layout and.nfor row major layout
- vl,vu
- If, the lower and upper bounds of the interval to be searched for eigenvalues.range='V'Constraint:.vl<vuIforrange='A''I',vlandvuare not referenced.
- il,iu
- If, the indices in ascending order of the smallest and largest eigenvalues to be returned.range='I'Constraint:1, if≤il≤iu≤n;n> 0andil=1ifiu=0.n= 0Iforrange='A''V',ilandiuare not referenced.
- abstol
- The absolute error tolerance to which each eigenvalue is required.SeeApplication notesfor details on error tolerance.
- ldq,ldz
- The leading dimensions of the output arraysqandz, respectively.Constraints:;ldq≥1,ldz≥1If, thenjobz='V'(1,ldq≥maxn) and(1,ldz≥maxn)for column major layout and.ldz≥max(1,m) for row major layout
Output Parameters
- q
- Array, sizemax(1,.ldz*n)If, thejobz='V'n-by-nunitary matrix is used in the reduction to tridiagonal form.If, the arrayjobz='N'qis not referenced.
- m
- The total number of eigenvalues found,0.≤m≤nIf,range='A', ifm=n,range='I', and ifm=iu-il+1, the exact value ofrange='V'is not known in advance..m
- w
- Array, size at least max(1,n). The firstmelements contain the selected eigenvalues of the matrixAin ascending order.
- z
- Arrayz(size at least max(1,.ldz*m) for column major layout and max(1,ldz*n) for row major layout)If, then ifjobz='V', the firstinfo= 0mcolumns ofzcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with thei-th column ofzholding the eigenvector associated with.w[i- 1]If an eigenvector fails to converge, then that column ofzcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inifail.If, thenjobz='N'zis not referenced.
- ab
- On exit, this array is overwritten by the values generated during the reduction to tridiagonal form.If, the first superdiagonal and the diagonal of the tridiagonal matrixuplo='U'Tare returned in rowskdandkd+1 ofab, and if, the diagonal and first subdiagonal ofuplo='L'Tare returned in the first two rows ofab.
- ifail
- Array, size at least max(1,n).If, then ifjobz='V', the firstinfo= 0melements ofifailare zero; if, theinfo> 0ifailcontains the indices of the eigenvectors that failed to converge.If, thenjobz='N'ifailis not referenced.
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
= i
i
eigenvectors failed to converge; their indices are stored in the array ifail
.Application Notes
An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to , where
abstol
+ ε
* max( |a|,|b| )ε
is the machine precision. If will be used in its place, where
abstol
is less than or equal to zero, then ε
*||T
||1
T
is the tridiagonal matrix obtained by reducing A
to tridiagonal form. Eigenvalues will be computed most accurately when abstol
is set to twice the underflow threshold 2*?lamch
('S'), not zero. If this routine returns with , indicating that some eigenvectors did not converge, try setting
info
> 0abstol
to 2*?lamch
('S').