LAPACK++  2022.07.00
LAPACK C++ API
Standard, AV = V Lambda

Functions

int64_t lapack::geev (lapack::Job jobvl, lapack::Job jobvr, int64_t n, double *A, int64_t lda, std::complex< double > *W, double *VL, int64_t ldvl, double *VR, int64_t ldvr)
 
int64_t lapack::geev (lapack::Job jobvl, lapack::Job jobvr, int64_t n, float *A, int64_t lda, std::complex< float > *W, float *VL, int64_t ldvl, float *VR, int64_t ldvr)
 
int64_t lapack::geev (lapack::Job jobvl, lapack::Job jobvr, int64_t n, std::complex< double > *A, int64_t lda, std::complex< double > *W, std::complex< double > *VL, int64_t ldvl, std::complex< double > *VR, int64_t ldvr)
 Computes for an n-by-n nonsymmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors. More...
 
int64_t lapack::geev (lapack::Job jobvl, lapack::Job jobvr, int64_t n, std::complex< float > *A, int64_t lda, std::complex< float > *W, std::complex< float > *VL, int64_t ldvl, std::complex< float > *VR, int64_t ldvr)
 

Detailed Description

Function Documentation

◆ geev()

int64_t lapack::geev ( lapack::Job  jobvl,
lapack::Job  jobvr,
int64_t  n,
std::complex< double > *  A,
int64_t  lda,
std::complex< double > *  W,
std::complex< double > *  VL,
int64_t  ldvl,
std::complex< double > *  VR,
int64_t  ldvr 
)

Computes for an n-by-n 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.

Overloaded versions are available for float, double, std::complex<float>, and std::complex<double>.

Parameters
[in]jobvl
  • lapack::Job::NoVec: left eigenvectors of A are not computed;
  • lapack::Job::Vec: left eigenvectors of are computed.
[in]jobvr
  • lapack::Job::NoVec: right eigenvectors of A are not computed;
  • lapack::Job::Vec: right eigenvectors of A are computed.
[in]nThe order of the matrix A. n >= 0.
[in,out]AThe n-by-n matrix A, stored in an lda-by-n array. On entry, the n-by-n matrix A. On exit, A has been overwritten.
[in]ldaThe leading dimension of the array A. lda >= max(1,n).
[out]WThe vector W of length n. W contains the computed eigenvalues.
Note: In LAPACK++, W is always complex, whereas LAPACK with a real matrix A uses a split-complex representation (WR, WI) for W.
[out]VLThe n-by-n matrix VL, stored in an ldvl-by-n array.
  • If jobvl = Vec, the left eigenvectors \(u_j\) are stored one after another in the columns of VL, in the same order as their eigenvalues.
  • If jobvl = NoVec, VL is not referenced.
  • For std::complex versions: \(u_j\) = VL(:,j), the j-th column of VL.
  • For real (float, double) versions:
    • If the j-th eigenvalue is real, then \(u_j\) = VL(:,j), the j-th column of VL.
    • If the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then \(u_j \) = VL(:,j) + i*VL(:,j+1) and \(u_{j+1}\) = VL(:,j) - i*VL(:,j+1).
[in]ldvlThe leading dimension of the array VL. ldvl >= 1; if jobvl = Vec, ldvl >= n.
[out]VRThe n-by-n matrix VR, stored in an ldvr-by-n array.
  • If jobvr = Vec, the right eigenvectors \(v_j\) are stored one after another in the columns of VR, in the same order as their eigenvalues.
  • If jobvr = NoVec, VR is not referenced.
  • For std::complex versions: \(v_j\) = VR(:,j), the j-th column of VR.
  • For real (float, double) versions:
    • If the j-th eigenvalue is real, then \(v_j\) = VR(:,j), the j-th column of VR.
    • If the j-th and (j+1)-st eigenvalues form a complex conjugate pair, then \(v_j \) = VR(:,j) + i*VR(:,j+1) and \(v_{j+1}\) = VR(:,j) - i*VR(:,j+1).
[in]ldvrThe leading dimension of the array VR. ldvr >= 1; if jobvr = Vec, ldvr >= n.
Returns
= 0: successful exit
> 0: if return value = i, the QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed; elements i+1:n of W contain eigenvalues which have converged.