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

◆ zgeev()

void zgeev ( char  jobvl,
char  jobvr,
int  n,
int  lda,
doublecomplex  a[],
doublecomplex  w[],
int  ldvl,
doublecomplex  vl[],
int  ldvr,
doublecomplex  vr[],
doublecomplex  work[],
int  lwork,
double  rwork[],
int *  info 
)

(Simple driver) Eigenvalues and left and/or right eigenvectors of a complex matrix

Purpose
This routine computes for an n x n complex nonsymmetric matrix A, all eigenvalues and, optionally, the left and/or right eigenvectors. The matrix A is reduced to upper Hessenberg form first. Then the eigenvalues and, optionally, the Schur factorization are computed by QR method. The engenvectors are computed from the Schur decomposition.

The right eigenvector v(j) of A satisfies
A * v(j) = lambda(j) * v(j)
where lambda(j) is its eigenvalue.
The left eigenvector u(j) of A satisfies
u(j)^H * A = lambda(j) * u(j)^H
where u(j)^H denotes the conjugate transpose of u(j).

The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.
Parameters
[in]jobvl= 'N': left eigenvectors of A are not computed.
= 'V': left eigenvectors of A are computed.
[in]jobvr= 'N': right eigenvectors of A are not computed.
= 'V': right eigenvectors of A are computed.
[in]nOrder of the matrix A. (n >= 0) (If n = 0, returns without computation)
[in]ldaLeading dimension of the two dimensional array a[][]. (lda >= max(1, n))
[in,out]a[][]Array a[la][lda] (la >= n)
[in] n x n matrix A.
[out] a[][] has been overwritten.
[out]w[]Array w[lw] (lw >= n)
w[] contains the computed eigenvalues.
[in]ldvlLeading dimension of the two dimensional array vl[][]. (ldvl >= 1 if jobvl = 'N', ldvl >= n if jobvl = 'V')
[out]vl[][]Array vl[lvl][ldvl] (lvl >= n)
jobvl = 'V': The left eigenvectors u(j) are stored one after another in the rows of vl[][], in the same order as their eigenvalues (u(j) = j-th row of vl[][]).
jobvl = 'N': vl[][] is not referenced.
[in]ldvrLeading dimension of the two dimensional array vr[][]. (ldvr >= 1 if jobvr = 'N', ldvr >= n if jobvr = 'V')
[out]vr[][]Array vr[lvr][ldvr] (lvr >= n)
jobvr = 'V': The right eigenvectors v(j) are stored one after another in the rows of vr[][] in the same order as their eigenvalues (v(j) = j-th row of vr[][]).
jobvr = 'N': vr[][] is not referenced.
[out]work[]Array work[lwork]
Work array.
On exit, if info = 0, work[0] returns the optimal lwork.
[in]lworkThe dimension of the array work[]. (lwork >= max(1, 2*n))
For good performance, lwork must generally be larger.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] array, and returns the value in work[0].
[out]rwork[]Array rwork[lrwork] (lrwork >= 2*n)
Work array.
[out]info= 0: Successful exit
= -1: The argument jobvl had an illegal value (jobvl != 'V' nor 'N')
= -2: The argument jobvr had an illegal value (jobvr != 'V' nor 'N')
= -3: The argument n had an illegal value (n < 0)
= -4: The argument lda had an illegal value (lda < max(1, n))
= -7: The argument ldvl had an illegal value (ldvl too small)
= -9: The argument ldvr had an illegal value (ldvr too small)
= -12: The argument lwork had an illegal value (lwork too small)
= i > 0: The QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed; elements i to n-1 of w[] contain eigenvalues which have converged.
Reference
LAPACK