?stein2

Computes the eigenvectors corresponding to specified eigenvalues of a real symmetric tridiagonal matrix, using inverse iteration.

Syntax

Fortran:

call sstein2(n, d, e, m, w, iblock, isplit, orfac, z, ldz, work, iwork, ifail, info)

call dstein2(n, d, e, m, w, iblock, isplit, orfac, z, ldz, work, iwork, ifail, info)

C:

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

  • C: mkl_scalapack.h

Description

The ?stein2 routine is a modified LAPACK routine ?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

INTEGER. The order of the matrix T (n 0).

m

INTEGER. The number of eigenvectors to be found (0 m n).

d, e, w

REAL for single-precision flavors

DOUBLE PRECISION for double-precision flavors.

Arrays: d(*), size (n). The n diagonal elements of the tridiagonal matrix T.

e(*), size (n).

The (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to n-1. e(n) need not be set.

w(*), size (n).

The first m elements of w contain 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 array w from ?stebz with ORDER = 'B' is expected here).

The dimension of w must be at least max(1, n).

iblock

INTEGER.

Array, size (n).

The submatrix indices associated with the corresponding eigenvalues in w ;

iblock(i) = 1, if eigenvalue w(i) belongs to the first submatrix from the top,

iblock(i) = 2, if eigenvalue w(i) belongs to the second submatrix, etc. (The output array iblock from ?stebz is expected here).

isplit

INTEGER.

Array, size (n).

The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to isplit(1), the second submatrix consists of rows/columns isplit(1)+1 through isplit( 2 ), etc. (The output array isplit from ?stebz is expected here).

orfac

REAL for single-precision flavors

DOUBLE PRECISION for double-precision flavors.

orfac specifies which eigenvectors should be orthogonalized. Eigenvectors that correspond to eigenvalues which are within orfac*||T|| of each other are to be orthogonalized.

ldz

INTEGER. The leading dimension of the output array z; ldz max(1, n).

work

REAL for single-precision flavors

DOUBLE PRECISION for double-precision flavors.

Workspace array, size (5n).

iwork

INTEGER. Workspace array, size (n).

Output Parameters

z

REAL for sstein2

DOUBLE PRECISION for dstein2

Array, size ldz by m.

The computed eigenvectors. The eigenvector associated with the eigenvalue w(i) is stored in the i-th column of z. Any vector that fails to converge is set to its current iterate after maxits iterations.

ifail

INTEGER.

Array, size (m).

On normal exit, all elements of ifail are zero. If one or more eigenvectors fail to converge after maxits iterations, then their indices are stored in the array ifail.

info

INTEGER.

info = 0, the exit is successful.

info < 0: if info = -i, the i-th had an illegal value.

info > 0: if info = i, then i eigenvectors failed to converge in maxits iterations. Their indices are stored in the array ifail.

For more complete information about compiler optimizations, see our Optimization Notice.