XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ dstein()

void dstein ( int  n,
double  d[],
double  e[],
int  m,
double  w[],
int  iblock[],
int  isplit[],
int  ldz,
double  z[],
double  work[],
int  iwork[],
int  ifail[],
int *  info 
)

Eigenvectors of a symmetric tridiagonal matrix (Inverse iteration method)

Purpose
This routine 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).
Parameters
[in]nOrder of the tridiagonal matrix. (n >= 0) (If n = 0, returns without computation)
[in]d[]Array d[ld] (ld >= n)
The n diagonal elements of the tridiagonal matrix T.
[in]e[]Array e[le] (le >= n - 1)
The (n - 1) off-diagonal elements of the tridiagonal matrix T.
[in]mThe number of eigenvectors to be found. (0 <= m <= n)
[in]w[]Array w[lw] (lw >= 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 dstebz with order = 'B' is expected here.)
[in]iblock[]Array iblock[liblock] (liblock >= 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, = 2 if w[i] belongs to the second submatrix, etc. (The output array iblock[] from dstebz is expected here.)
[in]isplit[]Array isplit[lisplit] (lisplit >= n)
The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to isplit[0], the second of rows/columns isplit[0] + 1 through isplit[1], etc. (The output array isplit[] from dstebz is expected here.)
[in]ldzLeading dimension of the two dimensional array z[][]. (ldz >= max(1, n))
[out]z[][]Array z[lz][ldz] (lz >= max(1, m))
The computed eigenvectors. The eigenvector associated with the eigenvalue w[i] is stored in the i-th row of z[]. Any vector which fails to converge is set to its current iterate after maxits iterations.
[out]work[]Array work[lwork] (lwork >= 5*n)
Work array.
[out]iwork[]Array iwork[liwork] (liwork >= n)
Integer work array.
[out]ifail[]Array ifail[lifail] (lifail >= 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 array ifail[].
[out]info= 0: Successful exit.
= -1: The argument n had an illegal value. (n < 0)
= -4: The argument m had an illegal value. (m < 0 or m > n)
= -5: The argument w had an illegal value. (an element not in ascending order)
= -6: The argument iblock had an illegal value. (an element not in ascending order)
= -8: The argument ldz had an illegal value. (ldz too small)
= i > 0: Eigenvectors failed to converge in maxits iterations. Their indices are stored in array ifail[].
Reference
LAPACK