?stein2
?stein2
Computes the eigenvectors corresponding to specified eigenvalues of a real symmetric tridiagonal matrix, using inverse iteration.
Syntax
void
sstein2
(
MKL_INT
*n
,
float
*d
,
float
*e
,
MKL_INT
*m
,
float
*w
,
MKL_INT
*iblock
,
MKL_INT
*isplit
,
float
*orfac
,
float
*z
,
MKL_INT
*ldz
,
float
*work
,
MKL_INT
*iwork
,
MKL_INT
*ifail
,
MKL_INT
*info
);
void
dstein2
(
MKL_INT
*n
,
double
*d
,
double
*e
,
MKL_INT
*m
,
double
*w
,
MKL_INT
*iblock
,
MKL_INT
*isplit
,
double
*orfac
,
double
*z
,
MKL_INT
*ldz
,
double
*work
,
MKL_INT
*iwork
,
MKL_INT
*ifail
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
?stein2
function
is a modified LAPACK function
?stein
. It computes the eigenvectors of a real symmetric tridiagonal matrix T
corresponding to specified eigenvalues, using inverse iteration.The maximum number of iterations allowed for each eigenvector is specified by an internal parameter
maxits
(currently set to 5).Input Parameters
- n
- The order of the matrixT(.n≥0)
- m
- The number of eigenvectors to be found(0.≤m≤n)
- d,e,w
- Arrays:d, of sizen. Thendiagonal elements of the tridiagonal matrixT.e, of sizen.The(subdiagonal elements of the tridiagonal matrixn-1)T, in elements 1 to.n-1e[need not be set.n-1]w, of sizen.The firstmelements ofwcontain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. (The output arraywfrom?stebzwithis expected here).ORDER='B'The size ofwmust be at leastmax(1,.n)
- iblock
- Array of sizen.The submatrix indices associated with the corresponding eigenvalues inw;iblock[= 1, if eigenvaluei]w[belongs to the first submatrix from the top,i]iblock[= 2, if eigenvaluei]w[belongs to the second submatrix, etc. (The output arrayi]iblockfrom?stebzis expected here).
- isplit
- Array of sizen.The splitting points, at whichTbreaks up into submatrices. The first submatrix consists of rows/columns 1 toisplit[0], the second submatrix consists of rows/columnsisplit[0]+1 throughisplit[1], etc. (The output arrayisplitfrom?stebzis expected here).
- orfac
- orfacspecifies which eigenvectors should be orthogonalized. Eigenvectors that correspond to eigenvalues which are withinof each other are to be orthogonalized.orfac*||T||
- ldz
- The leading dimension of the output arrayz;.ldz≥max(1,n)
- work
- Workspace array of size 5n.
- iwork
- Workspace array of sizen.
Output Parameters
- z
- Array of size.ldz*mThe computed eigenvectors. The eigenvector associated with the eigenvaluew[is stored in thei](-th column ofi+1)the matrixZrepresented byz,. Any vector that fails to converge is set to its current iterate afteri=0, ...,m-1maxitsiterations.
- ifail
- Array of sizem.On normal exit, all elements ofifailare zero. If one or more eigenvectors fail to converge aftermaxitsiterations, then their indices are stored in the arrayifail.
- info
- , the exit is successful.info= 0: ifinfo< 0, theinfo=-ii-th had an illegal value.: ifinfo> 0, theninfo=iieigenvectors failed to converge inmaxitsiterations. Their indices are stored in the arrayifail.