geevx#

Functions

void sgeevx(
    const char* balanc,
    const char* jobvl,
    const char* jobvr,
    const char* sense,
    const INT   n,
          f32*  A,
    const INT   lda,
          f32*  wr,
          f32*  wi,
          f32*  VL,
    const INT   ldvl,
          f32*  VR,
    const INT   ldvr,
          INT*  ilo,
          INT*  ihi,
          f32*  scale,
          f32*  abnrm,
          f32*  rconde,
          f32*  rcondv,
          f32*  work,
    const INT   lwork,
          INT*  iwork,
          INT*  info
);
void sgeevx(const char *balanc, const char *jobvl, const char *jobvr, const char *sense, const INT n, f32 *A, const INT lda, f32 *wr, f32 *wi, f32 *VL, const INT ldvl, f32 *VR, const INT ldvr, INT *ilo, INT *ihi, f32 *scale, f32 *abnrm, f32 *rconde, f32 *rcondv, f32 *work, const INT lwork, INT *iwork, INT *info)#

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

Optionally also, it computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV).

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.

Balancing a matrix means permuting the rows and columns to make it more nearly upper triangular, and applying a diagonal similarity transformation D * A * D**(-1), where D is a diagonal matrix, to make its rows and columns closer in norm and the condition numbers of its eigenvalues and eigenvectors smaller.

Parameters

in
balanc

Indicates how the input matrix should be diagonally scaled and/or permuted to improve the conditioning: = ‘N’: Do not diagonally scale or permute; = ‘P’: Perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale; = ‘S’: Diagonally scale the matrix, i.e. replace A by D*A*D**(-1), where D is a diagonal matrix; = ‘B’: Both diagonally scale and permute A.

in
jobvl

= ‘N’: left eigenvectors of A are not computed; = ‘V’: left eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvl must = ‘V’.

in
jobvr

= ‘N’: right eigenvectors of A are not computed; = ‘V’: right eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvr must = ‘V’.

in
sense

Determines which reciprocal condition numbers are computed: = ‘N’: None are computed; = ‘E’: Computed for eigenvalues only; = ‘V’: Computed for right eigenvectors only; = ‘B’: Computed for eigenvalues and right eigenvectors.

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. If jobvl = ‘V’ or jobvr = ‘V’, A contains the real Schur form of the balanced version of the input matrix A. 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.

out
VL

If jobvl = ‘V’, the left eigenvectors u(j) 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 v(j) 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
ilo

Integer value determined when A was balanced.

out
ihi

Integer value determined when A was balanced. The balanced A(i,j) = 0 if I > J and J = 0,…,ilo-2 or I = ihi,…,n-1.

out
scale

Array, dimension (n). Details of the permutations and scaling factors applied when balancing A.

out
abnrm

The one-norm of the balanced matrix.

out
rconde

Array, dimension (n). Reciprocal condition numbers of the eigenvalues.

out
rcondv

Array, dimension (n). Reciprocal condition numbers of the right eigenvectors.

out
work

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

in
lwork

The dimension of work. If sense = ‘N’ or ‘E’, lwork >= max(1, 2*n), and if jobvl = ‘V’ or jobvr = ‘V’, lwork >= 3*n. If sense = ‘V’ or ‘B’, lwork >= n*(n+6). If lwork = -1, a workspace query is assumed.

out
iwork

Integer array, dimension (2*n-2). If sense = ‘N’ or ‘E’, not referenced.

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; elements 0:ilo-2 and i:n-1 of wr and wi contain eigenvalues which have converged.

Functions

void dgeevx(
    const char* balanc,
    const char* jobvl,
    const char* jobvr,
    const char* sense,
    const INT   n,
          f64*  A,
    const INT   lda,
          f64*  wr,
          f64*  wi,
          f64*  VL,
    const INT   ldvl,
          f64*  VR,
    const INT   ldvr,
          INT*  ilo,
          INT*  ihi,
          f64*  scale,
          f64*  abnrm,
          f64*  rconde,
          f64*  rcondv,
          f64*  work,
    const INT   lwork,
          INT*  iwork,
          INT*  info
);
void dgeevx(const char *balanc, const char *jobvl, const char *jobvr, const char *sense, const INT n, f64 *A, const INT lda, f64 *wr, f64 *wi, f64 *VL, const INT ldvl, f64 *VR, const INT ldvr, INT *ilo, INT *ihi, f64 *scale, f64 *abnrm, f64 *rconde, f64 *rcondv, f64 *work, const INT lwork, INT *iwork, INT *info)#

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

Optionally also, it computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV).

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.

Balancing a matrix means permuting the rows and columns to make it more nearly upper triangular, and applying a diagonal similarity transformation D * A * D**(-1), where D is a diagonal matrix, to make its rows and columns closer in norm and the condition numbers of its eigenvalues and eigenvectors smaller.

Parameters

in
balanc

Indicates how the input matrix should be diagonally scaled and/or permuted to improve the conditioning: = ‘N’: Do not diagonally scale or permute; = ‘P’: Perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale; = ‘S’: Diagonally scale the matrix, i.e. replace A by D*A*D**(-1), where D is a diagonal matrix; = ‘B’: Both diagonally scale and permute A.

in
jobvl

= ‘N’: left eigenvectors of A are not computed; = ‘V’: left eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvl must = ‘V’.

in
jobvr

= ‘N’: right eigenvectors of A are not computed; = ‘V’: right eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvr must = ‘V’.

in
sense

Determines which reciprocal condition numbers are computed: = ‘N’: None are computed; = ‘E’: Computed for eigenvalues only; = ‘V’: Computed for right eigenvectors only; = ‘B’: Computed for eigenvalues and right eigenvectors.

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. If jobvl = ‘V’ or jobvr = ‘V’, A contains the real Schur form of the balanced version of the input matrix A. 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.

out
VL

If jobvl = ‘V’, the left eigenvectors u(j) 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 v(j) 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
ilo

Integer value determined when A was balanced.

out
ihi

Integer value determined when A was balanced. The balanced A(i,j) = 0 if I > J and J = 0,…,ilo-2 or I = ihi,…,n-1.

out
scale

Array, dimension (n). Details of the permutations and scaling factors applied when balancing A.

out
abnrm

The one-norm of the balanced matrix.

out
rconde

Array, dimension (n). Reciprocal condition numbers of the eigenvalues.

out
rcondv

Array, dimension (n). Reciprocal condition numbers of the right eigenvectors.

out
work

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

in
lwork

The dimension of work. If sense = ‘N’ or ‘E’, lwork >= max(1, 2*n), and if jobvl = ‘V’ or jobvr = ‘V’, lwork >= 3*n. If sense = ‘V’ or ‘B’, lwork >= n*(n+6). If lwork = -1, a workspace query is assumed.

out
iwork

Integer array, dimension (2*n-2). If sense = ‘N’ or ‘E’, not referenced.

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; elements 0:ilo-2 and i:n-1 of wr and wi contain eigenvalues which have converged.

Functions

void cgeevx(
    const char* balanc,
    const char* jobvl,
    const char* jobvr,
    const char* sense,
    const INT   n,
          c64*  A,
    const INT   lda,
          c64*  W,
          c64*  VL,
    const INT   ldvl,
          c64*  VR,
    const INT   ldvr,
          INT*  ilo,
          INT*  ihi,
          f32*  scale,
          f32*  abnrm,
          f32*  rconde,
          f32*  rcondv,
          c64*  work,
    const INT   lwork,
          f32*  rwork,
          INT*  info
);
void cgeevx(const char *balanc, const char *jobvl, const char *jobvr, const char *sense, const INT n, c64 *A, const INT lda, c64 *W, c64 *VL, const INT ldvl, c64 *VR, const INT ldvr, INT *ilo, INT *ihi, f32 *scale, f32 *abnrm, f32 *rconde, f32 *rcondv, c64 *work, const INT lwork, f32 *rwork, INT *info)#

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

Optionally also, it computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV).

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.

Balancing a matrix means permuting the rows and columns to make it more nearly upper triangular, and applying a diagonal similarity transformation D * A * D**(-1), where D is a diagonal matrix, to make its rows and columns closer in norm and the condition numbers of its eigenvalues and eigenvectors smaller.

Parameters

in
balanc

Indicates how the input matrix should be diagonally scaled and/or permuted to improve the conditioning: = ‘N’: Do not diagonally scale or permute; = ‘P’: Perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale; = ‘S’: Diagonally scale the matrix, i.e. replace A by D*A*D**(-1), where D is a diagonal matrix; = ‘B’: Both diagonally scale and permute A.

in
jobvl

= ‘N’: left eigenvectors of A are not computed; = ‘V’: left eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvl must = ‘V’.

in
jobvr

= ‘N’: right eigenvectors of A are not computed; = ‘V’: right eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvr must = ‘V’.

in
sense

Determines which reciprocal condition numbers are computed: = ‘N’: None are computed; = ‘E’: Computed for eigenvalues only; = ‘V’: Computed for right eigenvectors only; = ‘B’: Computed for eigenvalues and right eigenvectors.

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. If jobvl = ‘V’ or jobvr = ‘V’, A contains the Schur form of the balanced version of the input matrix A. 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. 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 v(j) 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
ilo

Integer value determined when A was balanced.

out
ihi

Integer value determined when A was balanced. The balanced A(i,j) = 0 if I > J and J = 0,…,ilo-2 or I = ihi,…,n-1.

out
scale

Array, dimension (n). Details of the permutations and scaling factors applied when balancing A.

out
abnrm

The one-norm of the balanced matrix.

out
rconde

Array, dimension (n). Reciprocal condition numbers of the eigenvalues.

out
rcondv

Array, dimension (n). Reciprocal condition numbers of the right eigenvectors.

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. If sense = ‘N’ or ‘E’, lwork >= max(1, 2*n), and if sense = ‘V’ or ‘B’, lwork >= n*n+2*n. 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 or condition numbers have been computed; elements 0:ilo-2 and i:n-1 of W contain eigenvalues which have converged.

Functions

void zgeevx(
    const char* balanc,
    const char* jobvl,
    const char* jobvr,
    const char* sense,
    const INT   n,
          c128* A,
    const INT   lda,
          c128* W,
          c128* VL,
    const INT   ldvl,
          c128* VR,
    const INT   ldvr,
          INT*  ilo,
          INT*  ihi,
          f64*  scale,
          f64*  abnrm,
          f64*  rconde,
          f64*  rcondv,
          c128* work,
    const INT   lwork,
          f64*  rwork,
          INT*  info
);
void zgeevx(const char *balanc, const char *jobvl, const char *jobvr, const char *sense, const INT n, c128 *A, const INT lda, c128 *W, c128 *VL, const INT ldvl, c128 *VR, const INT ldvr, INT *ilo, INT *ihi, f64 *scale, f64 *abnrm, f64 *rconde, f64 *rcondv, c128 *work, const INT lwork, f64 *rwork, INT *info)#

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

Optionally also, it computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV).

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.

Balancing a matrix means permuting the rows and columns to make it more nearly upper triangular, and applying a diagonal similarity transformation D * A * D**(-1), where D is a diagonal matrix, to make its rows and columns closer in norm and the condition numbers of its eigenvalues and eigenvectors smaller.

Parameters

in
balanc

Indicates how the input matrix should be diagonally scaled and/or permuted to improve the conditioning: = ‘N’: Do not diagonally scale or permute; = ‘P’: Perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale; = ‘S’: Diagonally scale the matrix, i.e. replace A by D*A*D**(-1), where D is a diagonal matrix; = ‘B’: Both diagonally scale and permute A.

in
jobvl

= ‘N’: left eigenvectors of A are not computed; = ‘V’: left eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvl must = ‘V’.

in
jobvr

= ‘N’: right eigenvectors of A are not computed; = ‘V’: right eigenvectors of A are computed. If sense = ‘E’ or ‘B’, jobvr must = ‘V’.

in
sense

Determines which reciprocal condition numbers are computed: = ‘N’: None are computed; = ‘E’: Computed for eigenvalues only; = ‘V’: Computed for right eigenvectors only; = ‘B’: Computed for eigenvalues and right eigenvectors.

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. If jobvl = ‘V’ or jobvr = ‘V’, A contains the Schur form of the balanced version of the input matrix A. 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. 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 v(j) 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
ilo

Integer value determined when A was balanced.

out
ihi

Integer value determined when A was balanced. The balanced A(i,j) = 0 if I > J and J = 0,…,ilo-2 or I = ihi,…,n-1.

out
scale

Array, dimension (n). Details of the permutations and scaling factors applied when balancing A.

out
abnrm

The one-norm of the balanced matrix.

out
rconde

Array, dimension (n). Reciprocal condition numbers of the eigenvalues.

out
rcondv

Array, dimension (n). Reciprocal condition numbers of the right eigenvectors.

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. If sense = ‘N’ or ‘E’, lwork >= max(1, 2*n), and if sense = ‘V’ or ‘B’, lwork >= n*n+2*n. 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 or condition numbers have been computed; elements 0:ilo-2 and i:n-1 of W contain eigenvalues which have converged.