geev#

Functions

void sgeev(
    const char* jobvl,
    const char* jobvr,
    const INT   n,
          f32*  A,
    const INT   lda,
          f32*  wr,
          f32*  wi,
          f32*  VL,
    const INT   ldvl,
          f32*  VR,
    const INT   ldvr,
          f32*  work,
    const INT   lwork,
          INT*  info
);
void sgeev(const char *jobvl, const char *jobvr, const INT n, f32 *A, const INT lda, f32 *wr, f32 *wi, f32 *VL, const INT ldvl, f32 *VR, const INT ldvr, f32 *work, const INT lwork, INT *info)#

SGEEV computes for an N-by-N real nonsymmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors.

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
n

The order of the matrix A. n >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, A has been overwritten. Dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

out
wr

Array, dimension (n). Real parts of eigenvalues.

out
wi

Array, dimension (n). Imaginary parts of eigenvalues. Complex conjugate pairs appear consecutively with the eigenvalue having positive imaginary part first.

out
VL

If jobvl = ‘V’, the left eigenvectors are stored one after another in the columns of VL. Dimension (ldvl, n). If jobvl = ‘N’, VL is not referenced.

in
ldvl

The leading dimension of VL. ldvl >= 1; if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors are stored one after another in the columns of VR. Dimension (ldvr, n). If jobvr = ‘N’, VR is not referenced.

in
ldvr

The leading dimension of VR. ldvr >= 1; if jobvr = ‘V’, ldvr >= n.

out
work

Workspace array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns optimal lwork.

in
lwork

The dimension of work. lwork >= max(1, 3*n), and if jobvl = ‘V’ or jobvr = ‘V’, lwork >= 4*n. If lwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the QR algorithm failed to compute all eigenvalues, and no eigenvectors have been computed; elements i:n-1 of wr and wi contain eigenvalues which have converged.

Functions

void dgeev(
    const char* jobvl,
    const char* jobvr,
    const INT   n,
          f64*  A,
    const INT   lda,
          f64*  wr,
          f64*  wi,
          f64*  VL,
    const INT   ldvl,
          f64*  VR,
    const INT   ldvr,
          f64*  work,
    const INT   lwork,
          INT*  info
);
void dgeev(const char *jobvl, const char *jobvr, const INT n, f64 *A, const INT lda, f64 *wr, f64 *wi, f64 *VL, const INT ldvl, f64 *VR, const INT ldvr, f64 *work, const INT lwork, INT *info)#

DGEEV computes for an N-by-N real nonsymmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors.

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
n

The order of the matrix A. n >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, A has been overwritten. Dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

out
wr

Array, dimension (n). Real parts of eigenvalues.

out
wi

Array, dimension (n). Imaginary parts of eigenvalues. Complex conjugate pairs appear consecutively with the eigenvalue having positive imaginary part first.

out
VL

If jobvl = ‘V’, the left eigenvectors are stored one after another in the columns of VL. Dimension (ldvl, n). If jobvl = ‘N’, VL is not referenced.

in
ldvl

The leading dimension of VL. ldvl >= 1; if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors are stored one after another in the columns of VR. Dimension (ldvr, n). If jobvr = ‘N’, VR is not referenced.

in
ldvr

The leading dimension of VR. ldvr >= 1; if jobvr = ‘V’, ldvr >= n.

out
work

Workspace array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns optimal lwork.

in
lwork

The dimension of work. lwork >= max(1, 3*n), and if jobvl = ‘V’ or jobvr = ‘V’, lwork >= 4*n. If lwork = -1, a workspace query is assumed.

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the QR algorithm failed to compute all eigenvalues, and no eigenvectors have been computed; elements i:n-1 of wr and wi contain eigenvalues which have converged.

Functions

void cgeev(
    const char* jobvl,
    const char* jobvr,
    const INT   n,
          c64*  A,
    const INT   lda,
          c64*  W,
          c64*  VL,
    const INT   ldvl,
          c64*  VR,
    const INT   ldvr,
          c64*  work,
    const INT   lwork,
          f32*  rwork,
          INT*  info
);
void cgeev(const char *jobvl, const char *jobvr, const INT n, c64 *A, const INT lda, c64 *W, c64 *VL, const INT ldvl, c64 *VR, const INT ldvr, c64 *work, const INT lwork, f32 *rwork, INT *info)#

CGEEV computes for an N-by-N complex nonsymmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors.

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
n

The order of the matrix A. n >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, A has been overwritten. Dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

out
W

Complex array, dimension (n). Contains the computed eigenvalues.

out
VL

If jobvl = ‘V’, the left eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues. If jobvl = ‘N’, VL is not referenced. Dimension (ldvl, n).

in
ldvl

The leading dimension of VL. ldvl >= 1; if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. If jobvr = ‘N’, VR is not referenced. Dimension (ldvr, n).

in
ldvr

The leading dimension of VR. ldvr >= 1; if jobvr = ‘V’, ldvr >= n.

out
work

Complex workspace array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns optimal lwork.

in
lwork

The dimension of work. lwork >= max(1, 2*n). For good performance, lwork must generally be larger. If lwork = -1, a workspace query is assumed.

out
rwork

Single precision array, dimension (2*n).

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the QR algorithm failed to compute all eigenvalues, and no eigenvectors have been computed; elements i:n-1 of W contain eigenvalues which have converged.

Functions

void zgeev(
    const char* jobvl,
    const char* jobvr,
    const INT   n,
          c128* A,
    const INT   lda,
          c128* W,
          c128* VL,
    const INT   ldvl,
          c128* VR,
    const INT   ldvr,
          c128* work,
    const INT   lwork,
          f64*  rwork,
          INT*  info
);
void zgeev(const char *jobvl, const char *jobvr, const INT n, c128 *A, const INT lda, c128 *W, c128 *VL, const INT ldvl, c128 *VR, const INT ldvr, c128 *work, const INT lwork, f64 *rwork, INT *info)#

ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors.

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
n

The order of the matrix A. n >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, A has been overwritten. Dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

out
W

Complex array, dimension (n). Contains the computed eigenvalues.

out
VL

If jobvl = ‘V’, the left eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues. If jobvl = ‘N’, VL is not referenced. Dimension (ldvl, n).

in
ldvl

The leading dimension of VL. ldvl >= 1; if jobvl = ‘V’, ldvl >= n.

out
VR

If jobvr = ‘V’, the right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. If jobvr = ‘N’, VR is not referenced. Dimension (ldvr, n).

in
ldvr

The leading dimension of VR. ldvr >= 1; if jobvr = ‘V’, ldvr >= n.

out
work

Complex workspace array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns optimal lwork.

in
lwork

The dimension of work. lwork >= max(1, 2*n). For good performance, lwork must generally be larger. If lwork = -1, a workspace query is assumed.

out
rwork

Double precision array, dimension (2*n).

out
info

  • = 0: successful exit

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

  • > 0: if info = i, the QR algorithm failed to compute all eigenvalues, and no eigenvectors have been computed; elements i:n-1 of W contain eigenvalues which have converged.