|
|
◆ dsbgvx()
| void dsbgvx |
( |
char |
jobz, |
|
|
char |
range, |
|
|
char |
uplo, |
|
|
int |
n, |
|
|
int |
ka, |
|
|
int |
kb, |
|
|
int |
ldab, |
|
|
double |
ab[], |
|
|
int |
ldbb, |
|
|
double |
bb[], |
|
|
int |
ldq, |
|
|
double |
q[], |
|
|
double |
vl, |
|
|
double |
vu, |
|
|
int |
il, |
|
|
int |
iu, |
|
|
double |
abstol, |
|
|
int * |
m, |
|
|
double |
w[], |
|
|
int |
ldz, |
|
|
double |
z[], |
|
|
double |
work[], |
|
|
int |
iwork[], |
|
|
int |
ifail[], |
|
|
int * |
info |
|
) |
| |
(Expert driver) Generalized eigenvalue problem of symmetric band matrices
- Purpose
- This routine computes selected eigenvalues, and optionally, eigenvectors of a real generalized symmetric-definite banded eigenproblem, of the form Here A and B are assumed to be symmetric and banded, and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either all eigenvalues, a range of values or a range of indices for the desired eigenvalues.
- Parameters
-
| [in] | jobz | = 'N': Compute eigenvalues only.
= 'V': Compute eigenvalues and eigenvectors. |
| [in] | range | = 'A': All eigenvalues will be found.
= 'V': All eigenvalues in the half-open interval (vl, vu] will be found.
= 'I': The il-th through iu-th eigenvalues will be found. |
| [in] | uplo | = 'U': Upper triangles of A and B are stored.
= 'L': Lower triangles of A and B are stored. |
| [in] | n | Order of the matrices A and B. (n >= 0) (If n = 0, returns without computation) |
| [in] | ka | Number of super-diagonals of the matrix A if uplo='U' or the number of sub-diagonals if uplo = 'L'. (ka >= 0) |
| [in] | kb | Number of super-diagonals of the matrix B if uplo='U' or the number of sub-diagonals if uplo = 'L'. (kb >= 0) |
| [in] | ldab | Leading dimension of the two dimensional array ab[][]. (ldab >= ka + 1) |
| [in,out] | ab[][] | Array ab[lab][ldab] (lab >= n)
[in] The upper or lower triangle of the symmetric band matrix A, stored in the first ka+1 columns of the array. The j-th column of A is stored in the j-th row of the array ab as follows.
uplo = 'U': ab[j][ka + i - j] = Aij for max(0, j - ka - 1) <= i <= j <= n - 1.
uplo = 'L': ab[j][i - j] = Aij for 0 <= j <= i <= min(n - 1, j + ka - 1).
[out] The contents of ab[][] are destroyed. |
| [in] | ldbb | Leading dimension of the two dimensional array bb[][]. (ldbb >= kb + 1) |
| [in,out] | bb[][] | Array bb[lbb][ldbb] (lbb >= n)
[in] The upper or lower triangle of the symmetric positive definite band matrix B, stored in the first kb+1 columns of the array. The j-th column of B is stored in the j-th row of the array bb as follows.
uplo = 'U': bb[j][kb + i - j] = Bij for max(0, j - kb - 1) <= i <= j <= n - 1.
uplo = 'L': bb[j][i - j] = Bij for 0 <= j <= i <= min(n - 1, j + kb - 1).
[out] The factor S from the split Cholesky factorization B = S^T*S, as returned by dpbstf. |
| [in] | ldq | Leading dimension of the two dimensional array q[][]. (ldq >= 1 if jobz = 'N', ldq >= max(1, n) if jobz = 'V') |
| [out] | q[][] | Array q[lq][ldq] (lq >= n)
jobz = 'V': The n x n matrix used in the reduction of A*x = lambda*B*x to standard form, i.e. C*x = lambda*x, and consequently C to tridiagonal form.
jobz = 'N': The array q[][] is not referenced. |
| [in] | vl | range = 'V': The lower bound of the interval to be searched for eigenvalues. (vl < vu)
range = 'A' or 'I': Not referenced. |
| [in] | vu | range = 'V': The upper bound of the interval to be searched for eigenvalues. (vl < vu)
range = 'A' or 'I': Not referenced. |
| [in] | il | range = 'I': The index of the smallest eigenvalue to be returned. (1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0)
range = 'A' or 'V': Not referenced. |
| [in] | iu | range = 'I': The index of the largest eigenvalues to be returned. (1 <= il <= iu <= n, if n > 0; il = 1 and iu = 0 if n = 0)
range = 'A' or 'V': Not referenced. |
| [in] | abstol | The absolute error tolerance for the eigenvalues.
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 abstol + eps * max(|a|, |b|), where eps is the machine precision. If abstol is less than or equal to zero, then eps*|T| will be used in its place, where |T| is the 1-norm of 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*dlamch('S'), not zero. If this routine returns with info > 0, indicating that some eigenvectors did not converge, try setting abstol to 2*dlamch('S'). |
| [out] | m | The total number of eigenvalues found. (0 <= m <= n)
If range = 'A', m = n, and if range = 'I', m = iu - il + 1. |
| [out] | w[] | Array w[lw] (lw >= n)
On normal exit, the first m elements contain the selected eigenvalues in ascending order. |
| [in] | ldz | Leading dimension of the two dimensional array z[][]. (ldz >= 1 if jobz = 'N', ldz >= max(1, n) if jobz = 'V')
|
| [out] | z[][] | Array z[lz][ldz] (lz >= max(1, m))
jobz = 'V': If info = 0, the first m columns of z[][] contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of z[][] holding the eigenvector associated with w[i].
The eigenvectors are normalized so that Z^T*B*Z = I.
If an eigenvector fails to converge, then that column of z[][] contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in ifail[].
jobz = 'N': z[][] is not referenced.
Note: The user must ensure that at least max(1, m) columns are supplied in the array z[][]; if range = 'V', the exact value of m is not known in advance and an upper bound must be used. |
| [out] | work[] | Array work[lwork] (lwork >= 7*n)
Work array. |
| [out] | iwork[] | Array iwork[liwork] (liwork >= 5*n)
Integer work array. |
| [out] | ifail[] | Array ifail[lifail] (lifail >= n)
jobz = 'V': If info = 0, the first m elements of ifail[] are zero. If info > 0, then ifail[] contains the indices of the eigenvectors that failed to converge.
jobz = 'N': ifail[] is not referenced. |
| [out] | info | = 0: Successful exit
= -1: The argument jobz had an illegal value (jobz != 'V' nor 'N')
= -2: The argument range had an illegal value (range != 'A', 'V' nor 'I')
= -3: The argument uplo had an illegal value (uplo != 'U' nor 'L')
= -4: The argument n had an illegal value (n < 0)
= -5: The argument ka had an illegal value (ka < 0)
= -6: The argument kb had an illegal value (kb < 0 or kb > ka)
= -7: The argument ldab had an illegal value (ldab < ka + 1)
= -9: The argument ldbb had an illegal value (ldbb < kb + 1)
= -11: The argument ldq had an illegal value (ldq too small)
= -14: The argument vu had an illegal value (vu <= vl)
= -15: The argument il had an illegal value (il < 1 or il > n)
= -16: The argument iu had an illegal value (iu < min(n, il) or iu > n)
= -20: The argument ldz had an illegal value (ldz too small)
= i (0 < i <= n): i eigenvectors failed to converge. Their indices are stored in ifail[].
= i (i > n): dpbstf returned info = i-n; the leading minor of order i-n of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed. |
- Reference
- LAPACK
|