?hpevx
?hpevx
Computes selected eigenvalues and, optionally, eigenvectors of a Hermitian matrix in packed storage.
Syntax
lapack_int LAPACKE_chpevx
(
int
matrix_layout
,
char
jobz
,
char
range
,
char
uplo
,
lapack_int
n
,
lapack_complex_float*
ap
,
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_zhpevx
(
int
matrix_layout
,
char
jobz
,
char
range
,
char
uplo
,
lapack_int
n
,
lapack_complex_double*
ap
,
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 matrix
A
in packed storage. 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'apstores the packed upper triangular part ofA.If,uplo='L'apstores the packed lower triangular part ofA.
- n
- The order of the matrixA().n≥0
- ap
- Arrayapcontains the packed upper or lower triangle of the Hermitian matrixA, as specified byuplo.The size ofapmust be at least max(1,n*(n+1)/2).
- 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.
- ldz
- The leading dimension of the output arrayz.Constraints:if, thenjobz='N';ldz≥1if, thenjobz='V'ldz≥max(1,n)for column major layout and.ldz≥max(1,m) for row major layout
Output Parameters
- ap
- On exit, this array is overwritten by the values generated during the reduction to tridiagonal form. The elements of the diagonal and the off-diagonal of the tridiagonal matrix overwrite the corresponding elements ofA.
- m
- The total number of eigenvalues found,0.≤m≤n0. If≤m≤n,range='A', ifm=n,range='I', and ifm=iu-il+1the exact value ofrange='V'mis not known in advance..
- w
- Array, size at least max(1,n).If, contains the selected eigenvalues of the matrixinfo= 0Ain ascending order.
- z
- Arrayz(size 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 withw(i).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.
- ifail
- Array, size at least max(1,n).If, then ifjobz='V', the firstinfo= 0melements ofifailare zero; if, theinfo> 0ifailcontains the indices 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').