Blaze 3.9
Eigenvalue

LAPACK general matrix eigenvalue functions (geev)

void blaze::geev (char jobvl, char jobvr, blas_int_t n, float *A, blas_int_t lda, float *wr, float *wi, float *VL, blas_int_t ldvl, float *VR, blas_int_t ldvr, float *work, blas_int_t lwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense general single precision column-major matrix. More...
 
void blaze::geev (char jobvl, char jobvr, blas_int_t n, double *A, blas_int_t lda, double *wr, double *wi, double *VL, blas_int_t ldvl, double *VR, blas_int_t ldvr, double *work, blas_int_t lwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense general double precision column-major matrix. More...
 
void blaze::geev (char jobvl, char jobvr, blas_int_t n, complex< float > *A, blas_int_t lda, complex< float > *w, complex< float > *VL, blas_int_t ldvl, complex< float > *VR, blas_int_t ldvr, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense general single precision complex column-major matrix. More...
 
void blaze::geev (char jobvl, char jobvr, blas_int_t n, complex< double > *A, blas_int_t lda, complex< double > *w, complex< double > *VL, blas_int_t ldvl, complex< double > *VR, blas_int_t ldvr, complex< double > *work, blas_int_t lwork, double *rwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense general double precision complex column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
void blaze::geev (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w)
 LAPACK kernel for computing the eigenvalues of the given dense general matrix. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT , bool TF>
void blaze::geev (DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &VL, DenseVector< VT, TF > &w)
 LAPACK kernel for computing the eigenvalues of the given dense general matrix. More...
 
template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2>
void blaze::geev (DenseMatrix< MT1, SO1 > &A, DenseVector< VT, TF > &w, DenseMatrix< MT2, SO2 > &VR)
 LAPACK kernel for computing the eigenvalues of the given dense general matrix. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT , bool TF, typename MT3 , bool SO3>
void blaze::geev (DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &VL, DenseVector< VT, TF > &w, DenseMatrix< MT3, SO3 > &VR)
 LAPACK kernel for computing the eigenvalues of the given dense general matrix. More...
 

LAPACK generalized Schur decomposition functions (gges)

void blaze::gges (char jobvsl, char jobvsr, char sort, blas_int_t(*selctg)(const float *, const float *, const float *), blas_int_t n, float *A, blas_int_t lda, float *B, blas_int_t ldb, blas_int_t *sdim, float *alphar, float *alphai, float *beta, float *VSL, blas_int_t ldvsl, float *VSR, blas_int_t ldvsr, float *work, blas_int_t lwork, blas_int_t *bwork, blas_int_t *info)
 LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric single precision column-major matrices. More...
 
void blaze::gges (char jobvsl, char jobvsr, char sort, blas_int_t(*selctg)(const double *, const double *, const double *), blas_int_t n, double *A, blas_int_t lda, double *B, blas_int_t ldb, blas_int_t *sdim, double *alphar, double *alphai, double *beta, double *VSL, blas_int_t ldvsl, double *VSR, blas_int_t ldvsr, double *work, blas_int_t lwork, blas_int_t *bwork, blas_int_t *info)
 LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric double precision column-major matrices. More...
 
void blaze::gges (char jobvsl, char jobvsr, char sort, blas_int_t(*selctg)(const complex< float > *, const complex< float > *), blas_int_t n, complex< float > *A, blas_int_t lda, complex< float > *B, blas_int_t ldb, blas_int_t *sdim, complex< float > *alpha, complex< float > *beta, complex< float > *VSL, blas_int_t ldvsl, complex< float > *VSR, blas_int_t ldvsr, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *bwork, blas_int_t *info)
 LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric single precision complex column-major matrices. More...
 
void blaze::gges (char jobvsl, char jobvsr, char sort, blas_int_t(*selctg)(const complex< double > *, const complex< double > *), blas_int_t n, complex< double > *A, blas_int_t lda, complex< double > *B, blas_int_t ldb, blas_int_t *sdim, complex< double > *alpha, complex< double > *beta, complex< double > *VSL, blas_int_t ldvsl, complex< double > *VSR, blas_int_t ldvsr, complex< double > *work, blas_int_t lwork, double *rwork, blas_int_t *bwork, blas_int_t *info)
 LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric double precision complex column-major matrices. More...
 

LAPACK Hermitian matrix eigenvalue functions (heev)

void blaze::heev (char jobz, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float *w, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-major matrix. More...
 
void blaze::heev (char jobz, char uplo, blas_int_t n, complex< double > *A, blas_int_t lda, double *w, complex< double > *work, blas_int_t lwork, double *rwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian double precision column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
void blaze::heev (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char jobz, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix. More...
 

LAPACK Hermitian matrix eigenvalue functions (heevd)

void blaze::heevd (char jobz, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float *w, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t lrwork, blas_int_t *iwork, blas_int_t liwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-major matrix. More...
 
void blaze::heevd (char jobz, char uplo, blas_int_t n, complex< double > *A, blas_int_t lda, double *w, complex< double > *work, blas_int_t lwork, double *rwork, blas_int_t lrwork, blas_int_t *iwork, blas_int_t liwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian double precision column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
void blaze::heevd (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char jobz, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix. More...
 

LAPACK Hermitian matrix eigenvalue functions (heevx)

void blaze::heevx (char jobz, char range, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float vl, float vu, blas_int_t il, blas_int_t iu, float abstol, blas_int_t *m, float *w, complex< float > *Z, blas_int_t ldz, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *iwork, blas_int_t *ifail, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision complex column-major matrix. More...
 
void blaze::heevx (char jobz, char range, char uplo, blas_int_t n, complex< double > *A, blas_int_t lda, double vl, double vu, blas_int_t il, blas_int_t iu, double abstol, blas_int_t *m, double *w, complex< double > *Z, blas_int_t ldz, complex< double > *work, blas_int_t lwork, double *rwork, blas_int_t *iwork, blas_int_t *ifail, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian double precision complex column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
size_t blaze::heevx (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char uplo)
 LAPACK kernel for the eigenvalue computation of the given dense Hermitian matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF, typename ST >
size_t blaze::heevx (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char uplo, ST low, ST upp)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix. More...
 
template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2>
size_t blaze::heevx (DenseMatrix< MT1, SO1 > &A, DenseVector< VT, TF > &w, DenseMatrix< MT2, SO2 > &Z, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix. More...
 
template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2, typename ST >
size_t blaze::heevx (DenseMatrix< MT1, SO1 > &A, DenseVector< VT, TF > &w, DenseMatrix< MT2, SO2 > &Z, char uplo, ST low, ST upp)
 LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix. More...
 

LAPACK symmetric matrix eigenvalue functions (syev)

void blaze::syev (char jobz, char uplo, blas_int_t n, float *A, blas_int_t lda, float *w, float *work, blas_int_t lwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-major matrix. More...
 
void blaze::syev (char jobz, char uplo, blas_int_t n, double *A, blas_int_t lda, double *w, double *work, blas_int_t lwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric double precision column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
void blaze::syev (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char jobz, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix. More...
 

LAPACK symmetric matrix eigenvalue functions (syevd)

void blaze::syevd (char jobz, char uplo, blas_int_t n, float *A, blas_int_t lda, float *w, float *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t liwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-major matrix. More...
 
void blaze::syevd (char jobz, char uplo, blas_int_t n, double *A, blas_int_t lda, double *w, double *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t liwork, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric double precision column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
void blaze::syevd (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char jobz, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix. More...
 

LAPACK symmetric matrix eigenvalue functions (syevx)

void blaze::syevx (char jobz, char range, char uplo, blas_int_t n, float *A, blas_int_t lda, float vl, float vu, blas_int_t il, blas_int_t iu, float abstol, blas_int_t *m, float *w, float *Z, blas_int_t ldz, float *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t *ifail, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-major matrix. More...
 
void blaze::syevx (char jobz, char range, char uplo, blas_int_t n, double *A, blas_int_t lda, double vl, double vu, blas_int_t il, blas_int_t iu, double abstol, blas_int_t *m, double *w, double *Z, blas_int_t ldz, double *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t *ifail, blas_int_t *info)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric double precision column-major matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF>
size_t blaze::syevx (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix. More...
 
template<typename MT , bool SO, typename VT , bool TF, typename ST >
size_t blaze::syevx (DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char uplo, ST low, ST upp)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix. More...
 
template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2>
size_t blaze::syevx (DenseMatrix< MT1, SO1 > &A, DenseVector< VT, TF > &w, DenseMatrix< MT2, SO2 > &Z, char uplo)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix. More...
 
template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2, typename ST >
size_t blaze::syevx (DenseMatrix< MT1, SO1 > &A, DenseVector< VT, TF > &w, DenseMatrix< MT2, SO2 > &Z, char uplo, ST low, ST upp)
 LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix. More...
 

LAPACK generalized Schur factorization functions (gges)

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT1 , bool TF1, typename VT2 , bool TF2>
void blaze::gges (DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, DenseVector< VT1, TF1 > &alpha, DenseVector< VT2, TF2 > &beta)
 LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT1 , bool TF1, typename VT2 , bool TF2, typename Select >
void blaze::gges (DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, DenseVector< VT1, TF1 > &alpha, DenseVector< VT2, TF2 > &beta, Select select)
 LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename MT3 , bool SO3, typename VT1 , bool TF1, typename VT2 , bool TF2, typename MT4 , bool SO4>
void blaze::gges (DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, DenseMatrix< MT3, SO3 > &VSL, DenseVector< VT1, TF1 > &alpha, DenseVector< VT2, TF2 > &beta, DenseMatrix< MT4, SO4 > &VSR)
 LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename MT3 , bool SO3, typename VT1 , bool TF1, typename VT2 , bool TF2, typename MT4 , bool SO4, typename Select >
void blaze::gges (DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, DenseMatrix< MT3, SO3 > &VSL, DenseVector< VT1, TF1 > &alpha, DenseVector< VT2, TF2 > &beta, DenseMatrix< MT4, SO4 > &VSR, Select select)
 LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices. More...
 

Detailed Description

Function Documentation

◆ geev() [1/8]

void blaze::geev ( char  jobvl,
char  jobvr,
blas_int_t  n,
complex< double > *  A,
blas_int_t  lda,
complex< double > *  w,
complex< double > *  VL,
blas_int_t  ldvl,
complex< double > *  VR,
blas_int_t  ldvr,
complex< double > *  work,
blas_int_t  lwork,
double *  rwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general double precision complex column-major matrix.

Parameters
jobvl'V' to compute the left eigenvectors of A, 'N' to not compute them.
jobvr'V' to compute the right eigenvectors of A, 'N' to not compute them.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
wPointer to the first element of the vector for the eigenvalues.
VLPointer to the first element of the column-major matrix for the left eigenvectors.
ldvlThe total number of elements between two columns of the matrix VL $[0..\infty)$.
VRPointer to the first element of the column-major matrix for the right eigenvectors.
ldvrThe total number of elements between two columns of the matrix VR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= 2*n.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a non-symmetric n-by-n double precision complex column-major matrix based on the LAPACK zgeev() function. Optionally, it computes the left and/or right eigenvectors. The right eigenvector $v[j]$ of satisfies

                      \f[ A * v[j] = lambda[j] * v[j], \f]

where $lambda[j]$ is its eigenvalue. The left eigenvector $u[j]$ of A satisfies

                   \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]

where $u[j]^{H}$ denotes the conjugate transpose of $u[j]$.

Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

The parameter jobvl specifies the computation of the left eigenvectors:

  • 'V': The left eigenvectors of A are computed and returned in VL.
  • 'N': The left eigenvectors of A are not computed.

The parameter jobvr specifies the computation of the right eigenvectors:

  • 'V': The right eigenvectors of A are computed and returned in VR.
  • 'N': The right eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed; the elements with index larger than i have converged.

For more information on the zgeev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [2/8]

void blaze::geev ( char  jobvl,
char  jobvr,
blas_int_t  n,
complex< float > *  A,
blas_int_t  lda,
complex< float > *  w,
complex< float > *  VL,
blas_int_t  ldvl,
complex< float > *  VR,
blas_int_t  ldvr,
complex< float > *  work,
blas_int_t  lwork,
float *  rwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general single precision complex column-major matrix.

Parameters
jobvl'V' to compute the left eigenvectors of A, 'N' to not compute them.
jobvr'V' to compute the right eigenvectors of A, 'N' to not compute them.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
wPointer to the first element of the vector for the eigenvalues.
VLPointer to the first element of the column-major matrix for the left eigenvectors.
ldvlThe total number of elements between two columns of the matrix VL $[0..\infty)$.
VRPointer to the first element of the column-major matrix for the right eigenvectors.
ldvrThe total number of elements between two columns of the matrix VR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= 2*n.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a non-symmetric n-by-n single precision complex column-major matrix based on the LAPACK cgeev() function. Optionally, it computes the left and/or right eigenvectors. The right eigenvector $v[j]$ of satisfies

                      \f[ A * v[j] = lambda[j] * v[j], \f]

where $lambda[j]$ is its eigenvalue. The left eigenvector $u[j]$ of A satisfies

                   \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]

where $u[j]^{H}$ denotes the conjugate transpose of $u[j]$.

Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

The parameter jobvl specifies the computation of the left eigenvectors:

  • 'V': The left eigenvectors of A are computed and returned in VL.
  • 'N': The left eigenvectors of A are not computed.

The parameter jobvr specifies the computation of the right eigenvectors:

  • 'V': The right eigenvectors of A are computed and returned in VR.
  • 'N': The right eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed; the elements with index larger than i have converged.

For more information on the cgeev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [3/8]

void blaze::geev ( char  jobvl,
char  jobvr,
blas_int_t  n,
double *  A,
blas_int_t  lda,
double *  wr,
double *  wi,
double *  VL,
blas_int_t  ldvl,
double *  VR,
blas_int_t  ldvr,
double *  work,
blas_int_t  lwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general double precision column-major matrix.

Parameters
jobvl'V' to compute the left eigenvectors of A, 'N' to not compute them.
jobvr'V' to compute the right eigenvectors of A, 'N' to not compute them.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
wrPointer to the first element of the vector for the real part of the eigenvalues.
wiPointer to the first element of the vector for the imaginary part of the eigenvalues.
VLPointer to the first element of the column-major matrix for the left eigenvectors.
ldvlThe total number of elements between two columns of the matrix VL $[0..\infty)$.
VRPointer to the first element of the column-major matrix for the right eigenvectors.
ldvrThe total number of elements between two columns of the matrix VR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a non-symmetric n-by-n double precision column-major matrix based on the LAPACK dgeev() function. Optionally, it computes the left and/or right eigenvectors. The right eigenvector $v[j]$ of satisfies

                      \f[ A * v[j] = lambda[j] * v[j], \f]

where $lambda[j]$ is its eigenvalue. The left eigenvector $u[j]$ of A satisfies

                   \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]

where $u[j]^{H}$ denotes the conjugate transpose of $u[j]$.

Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

The parameter jobvl specifies the computation of the left eigenvectors:

  • 'V': The left eigenvectors of A are computed and returned in VL.
  • 'N': The left eigenvectors of A are not computed.

The parameter jobvr specifies the computation of the right eigenvectors:

  • 'V': The right eigenvectors of A are computed and returned in VR.
  • 'N': The right eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed; the elements with index larger than i have converged.

For more information on the dgeev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [4/8]

void blaze::geev ( char  jobvl,
char  jobvr,
blas_int_t  n,
float *  A,
blas_int_t  lda,
float *  wr,
float *  wi,
float *  VL,
blas_int_t  ldvl,
float *  VR,
blas_int_t  ldvr,
float *  work,
blas_int_t  lwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general single precision column-major matrix.

Parameters
jobvl'V' to compute the left eigenvectors of A, 'N' to not compute them.
jobvr'V' to compute the right eigenvectors of A, 'N' to not compute them.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
wrPointer to the first element of the vector for the real part of the eigenvalues.
wiPointer to the first element of the vector for the imaginary part of the eigenvalues.
VLPointer to the first element of the column-major matrix for the left eigenvectors.
ldvlThe total number of elements between two columns of the matrix VL $[0..\infty)$.
VRPointer to the first element of the column-major matrix for the right eigenvectors.
ldvrThe total number of elements between two columns of the matrix VR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a non-symmetric n-by-n single precision column-major matrix based on the LAPACK sgeev() function. Optionally, it computes the left and/or right eigenvectors. The right eigenvector $v[j]$ of satisfies

                      \f[ A * v[j] = lambda[j] * v[j], \f]

where $lambda[j]$ is its eigenvalue. The left eigenvector $u[j]$ of A satisfies

                   \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]

where $u[j]^{H}$ denotes the conjugate transpose of $u[j]$.

Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

The parameter jobvl specifies the computation of the left eigenvectors:

  • 'V': The left eigenvectors of A are computed and returned in VL.
  • 'N': The left eigenvectors of A are not computed.

The parameter jobvr specifies the computation of the right eigenvectors:

  • 'V': The right eigenvectors of A are computed and returned in VR.
  • 'N': The right eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed; the elements with index larger than i have converged.

For more information on the sgeev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [5/8]

template<typename MT , bool SO, typename VT , bool TF>
void blaze::geev ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general matrix.

Parameters
AThe given general matrix.
wThe resulting vector of complex eigenvalues.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a non-symmetric, non-Hermitian n-by-n matrix based on the LAPACK geev() functions. The complex eigenvalues are returned in the given vector w, which is resized to the correct size (if possible and necessary). Please note that no order of eigenvalues can be assumed, except that complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The general matrix A
// ... Initialization
DynamicVector<complex<double>,columnVector> w( 5UL ); // The vector for the complex eigenvalues
geev( A, w );
Efficient implementation of a dynamic matrix.
Definition: DynamicMatrix.h:242
Efficient implementation of an arbitrary sized vector.
Definition: DynamicVector.h:223
void geev(char jobvl, char jobvr, blas_int_t n, float *A, blas_int_t lda, float *wr, float *wi, float *VL, blas_int_t ldvl, float *VR, blas_int_t ldvr, float *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense general single precision column-major ...
Definition: geev.h:179
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
constexpr bool columnVector
Transpose flag for column vectors.
Definition: TransposeFlag.h:58

For more information on the geev() functions (i.e. sgeev(), dgeev(), cgeev(), and zgeev()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [6/8]

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT , bool TF>
void blaze::geev ( DenseMatrix< MT1, SO1 > &  A,
DenseMatrix< MT2, SO2 > &  VL,
DenseVector< VT, TF > &  w 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general matrix.

Parameters
AThe given general matrix.
VLThe resulting matrix of left eigenvectors.
wThe resulting vector of complex eigenvalues.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a non-symmetric, non-Hermitian n-by-n matrix based on the LAPACK geev() functions. Additionally, it computes the left eigenvectors. The left eigenvector $u[j]$ of A satisfies

                   \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]

where $u[j]^{H}$ denotes the conjugate transpose of $u[j]$.

The complex eigenvalues are returned in the given vector w. The left eigenvectors are returned in the rows of VL in case VL is a row-major matrix and in the columns of VL in case VL is a column-major matrix. Both w and VL are resized to the correct dimensions (if possible and necessary). Please note that no order of eigenvalues can be assumed, except that complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given matrix VL is a fixed size matrix and the dimensions don't match;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The general matrix A
// ... Initialization
DynamicMatrix<complex<double>,rowMajor> VL( 5UL, 5UL ); // The matrix for the left eigenvectors
DynamicVector<complex<double>,columnVector> w( 5UL ); // The vector for the complex eigenvalues
geev( A, VL, w );

For more information on the geev() functions (i.e. sgeev(), dgeev(), cgeev(), and zgeev()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [7/8]

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT , bool TF, typename MT3 , bool SO3>
void blaze::geev ( DenseMatrix< MT1, SO1 > &  A,
DenseMatrix< MT2, SO2 > &  VL,
DenseVector< VT, TF > &  w,
DenseMatrix< MT3, SO3 > &  VR 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general matrix.

Parameters
AThe given general matrix.
VLThe resulting matrix of left eigenvectors.
wThe resulting vector of complex eigenvalues.
VRThe resulting matrix of right eigenvectors.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a non-symmetric, non-Hermitian n-by-n matrix based on the LAPACK geev() functions. Additionally, it computes the left and right eigenvectors. The right eigenvector $v[j]$ of A satisfies

                      \f[ A * v[j] = lambda[j] * v[j], \f]

where $lambda[j]$ is its eigenvalue. The left eigenvector $u[j]$ of A satisfies

                   \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]

where $u[j]^{H}$ denotes the conjugate transpose of $u[j]$.

The complex eigenvalues are returned in the given vector w. The left eigenvectors are returned in the rows of VL in case VL is a row-major matrix and in the columns of VL in case VL is a column-major matrix. The right eigenvectors are returned in the rows of VR in case VR is a row-major matrix and in the columns of VR in case VR is a column-major matrix. w, VL, and VR are resized to the correct dimensions (if possible and necessary). Please note that no order of eigenvalues can be assumed, except that complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given matrix VL is a fixed size matrix and the dimensions don't match;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given matrix VR is a fixed size matrix and the dimensions don't match;
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The general matrix A
// ... Initialization
DynamicMatrix<complex<double>,rowMajor> VL( 5UL, 5UL ); // The matrix for the left eigenvectors
DynamicVector<complex<double>,columnVector> w( 5UL ); // The vector for the complex eigenvalues
DynamicMatrix<complex<double>,rowMajor> VR( 5UL, 5UL ); // The matrix for the right eigenvectors
geev( A, VL, w, VR );

For more information on the geev() functions (i.e. sgeev(), dgeev(), cgeev(), and zgeev()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geev() [8/8]

template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2>
void blaze::geev ( DenseMatrix< MT1, SO1 > &  A,
DenseVector< VT, TF > &  w,
DenseMatrix< MT2, SO2 > &  VR 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense general matrix.

Parameters
AThe given general matrix.
wThe resulting vector of complex eigenvalues.
VRThe resulting matrix of right eigenvectors.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a non-symmetric, non-Hermitian n-by-n matrix based on the LAPACK geev() functions. Additionally, it computes the right eigenvectors. The right eigenvector $v[j]$ of A satisfies

                      \f[ A * v[j] = lambda[j] * v[j], \f]

where $lambda[j]$ is its eigenvalue.

The complex eigenvalues are returned in the given vector w. The right eigenvectors are returned in the rows of VR in case VR is a row-major matrix and in the columns of VR in case VR is a column-major matrix. Both w and VL are resized to the correct dimensions (if possible and necessary). Please note that no order of eigenvalues can be assumed, except that complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given matrix VR is a fixed size matrix and the dimensions don't match;
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The general matrix A
// ... Initialization
DynamicVector<complex<double>,columnVector> w( 5UL ); // The vector for the complex eigenvalues
DynamicMatrix<complex<double>,rowMajor> VR( 5UL, 5UL ); // The matrix for the right eigenvectors
geev( A, w, VR );

For more information on the geev() functions (i.e. sgeev(), dgeev(), cgeev(), and zgeev()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [1/8]

void blaze::gges ( char  jobvsl,
char  jobvsr,
char  sort,
blas_int_t(*)(const complex< double > *, const complex< double > *)  selctg,
blas_int_t  n,
complex< double > *  A,
blas_int_t  lda,
complex< double > *  B,
blas_int_t  ldb,
blas_int_t sdim,
complex< double > *  alpha,
complex< double > *  beta,
complex< double > *  VSL,
blas_int_t  ldvsl,
complex< double > *  VSR,
blas_int_t  ldvsr,
complex< double > *  work,
blas_int_t  lwork,
double *  rwork,
blas_int_t bwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric double precision complex column-major matrices.

Parameters
jobvsl'V' to compute the left Schur vectors, 'N' to not compute them.
jobvsr'V' to compute the right Schur vectors, 'N' to not compute them.
sort'S' to order the eigenvalues on the diagonal, 'N' to not order them (see selctg).
selctgLogical function of two double precision complex arguments.
nThe order of the matrices A, B, VSL, and VSR $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix A.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
BPointer to the first element of the double precision complex column-major matrix B.
ldbThe total number of elements between two columns of the matrix B; size >= max( 1, n ).
sdimReturns the number of eigenvalues (after sorting) for which selctg is true.
alphaPointer to the first element of the eigenvalue numerator; size == n.
betaPointer to the first element of the eigenvalue denominator; size == n.
VSLPointer to the first element of the column-major matrix for the left Schur vectors.
ldvslThe total number of elements between two columns of the matrix VSL $[0..\infty)$.
VSRPointer to the first element of the column-major matrix for the right Schur vectors.
ldvsrThe total number of elements between two columns of the matrix VSR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size == 8*n.
bworkAuxiliary array; size == n.
infoReturn code of the function call.

This function computes for a pair of n-by-n double precision complex non-symmetric matrices (A,B) the generalized eigenvalues, the generalized real Schur form (S, T), and optionally the left and/or right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization

                  \f[ (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T ). \f]

Optionally, it also orders the eigenvalues such that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces).

The parameter jobvsl specifies the computation of the left Schur vectors:

  • 'V': The left Schur vectors of (A,B) are computed and returned in VSL.
  • 'N': The left Schur vectors of (A,B) are not computed.

The parameter jobvsr specifies the computation of the right Schur vectors:

  • 'V': The right Schur vectors of (A,B) are computed and returned in VSR.
  • 'N': The right Schur vectors of (A,B) are not computed.

Via the parameter selctg it is possible to select specific eigenvalues. selctg is a pointer to a function of two double precision complex arguments returning an blas_int_t value. In case sort is set to 'N', selctg is not referenced, else if sort is set to 'S' selctg is used to select eigenvalues to sort to the top left of the Schur form. An eigenvalue $ alpha[j]/beta[j] $ is selected if

selctg( &alpha[j], &beta[j])

evaluates to true; i.e. if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. On exit, the parameter sdim will contain the number of eigenvalues (after sorting) for which selctg is true. Note that complex conjugate pairs for which selctg is true for either eigenvalue count as 2.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 1,...,n: The QZ iteration failed. (A,B) are not in Schur form, but alphar(j), alphai(j), and beta(j) should be correct for j=info,...,n-1.
  • > n: see online reference for details.

For more information on the sgges() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [2/8]

void blaze::gges ( char  jobvsl,
char  jobvsr,
char  sort,
blas_int_t(*)(const complex< float > *, const complex< float > *)  selctg,
blas_int_t  n,
complex< float > *  A,
blas_int_t  lda,
complex< float > *  B,
blas_int_t  ldb,
blas_int_t sdim,
complex< float > *  alpha,
complex< float > *  beta,
complex< float > *  VSL,
blas_int_t  ldvsl,
complex< float > *  VSR,
blas_int_t  ldvsr,
complex< float > *  work,
blas_int_t  lwork,
float *  rwork,
blas_int_t bwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric single precision complex column-major matrices.

Parameters
jobvsl'V' to compute the left Schur vectors, 'N' to not compute them.
jobvsr'V' to compute the right Schur vectors, 'N' to not compute them.
sort'S' to order the eigenvalues on the diagonal, 'N' to not order them (see selctg).
selctgLogical function of two single precision complex arguments.
nThe order of the matrices A, B, VSL, and VSR $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix A.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
BPointer to the first element of the single precision complex column-major matrix B.
ldbThe total number of elements between two columns of the matrix B; size >= max( 1, n ).
sdimReturns the number of eigenvalues (after sorting) for which selctg is true.
alphaPointer to the first element of the eigenvalue numerator; size == n.
betaPointer to the first element of the eigenvalue denominator; size == n.
VSLPointer to the first element of the column-major matrix for the left Schur vectors.
ldvslThe total number of elements between two columns of the matrix VSL $[0..\infty)$.
VSRPointer to the first element of the column-major matrix for the right Schur vectors.
ldvsrThe total number of elements between two columns of the matrix VSR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size == 8*n.
bworkAuxiliary array; size == n.
infoReturn code of the function call.

This function computes for a pair of n-by-n single precision complex non-symmetric matrices (A,B) the generalized eigenvalues, the generalized real Schur form (S, T), and optionally the left and/or right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization

                  \f[ (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T ). \f]

Optionally, it also orders the eigenvalues such that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces).

The parameter jobvsl specifies the computation of the left Schur vectors:

  • 'V': The left Schur vectors of (A,B) are computed and returned in VSL.
  • 'N': The left Schur vectors of (A,B) are not computed.

The parameter jobvsr specifies the computation of the right Schur vectors:

  • 'V': The right Schur vectors of (A,B) are computed and returned in VSR.
  • 'N': The right Schur vectors of (A,B) are not computed.

Via the parameter selctg it is possible to select specific eigenvalues. selctg is a pointer to a function of two single precision complex arguments returning an blas_int_t value. In case sort is set to 'N', selctg is not referenced, else if sort is set to 'S' selctg is used to select eigenvalues to sort to the top left of the Schur form. An eigenvalue $ alpha[j]/beta[j] $ is selected if

selctg( &alpha[j], &beta[j])

evaluates to true; i.e. if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. On exit, the parameter sdim will contain the number of eigenvalues (after sorting) for which selctg is true. Note that complex conjugate pairs for which selctg is true for either eigenvalue count as 2.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 1,...,n: The QZ iteration failed. (A,B) are not in Schur form, but alphar(j), alphai(j), and beta(j) should be correct for j=info,...,n-1.
  • > n: see online reference for details.

For more information on the sgges() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [3/8]

void blaze::gges ( char  jobvsl,
char  jobvsr,
char  sort,
blas_int_t(*)(const double *, const double *, const double *)  selctg,
blas_int_t  n,
double *  A,
blas_int_t  lda,
double *  B,
blas_int_t  ldb,
blas_int_t sdim,
double *  alphar,
double *  alphai,
double *  beta,
double *  VSL,
blas_int_t  ldvsl,
double *  VSR,
blas_int_t  ldvsr,
double *  work,
blas_int_t  lwork,
blas_int_t bwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric double precision column-major matrices.

Parameters
jobvsl'V' to compute the left Schur vectors, 'N' to not compute them.
jobvsr'V' to compute the right Schur vectors, 'N' to not compute them.
sort'S' to order the eigenvalues on the diagonal, 'N' to not order them (see selctg).
selctgLogical function of three double precision arguments.
nThe order of the matrices A, B, VSL, and VSR $[0..\infty)$.
APointer to the first element of the double precision column-major matrix A.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
BPointer to the first element of the double precision column-major matrix B.
ldbThe total number of elements between two columns of the matrix B; size >= max( 1, n ).
sdimReturns the number of eigenvalues (after sorting) for which selctg is true.
alpharPointer to the first element of the real part of the eigenvalue numerator; size == n.
alphaiPointer to the first element of the imaginary part of the eigenvalue numerator; size == n.
betaPointer to the first element of the eigenvalue denominator; size == n.
VSLPointer to the first element of the column-major matrix for the left Schur vectors.
ldvslThe total number of elements between two columns of the matrix VSL $[0..\infty)$.
VSRPointer to the first element of the column-major matrix for the right Schur vectors.
ldvsrThe total number of elements between two columns of the matrix VSR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
bworkAuxiliary array; size == n.
infoReturn code of the function call.

This function computes for a pair of n-by-n double precision non-symmetric matrices (A,B) the generalized eigenvalues, the generalized real Schur form (S, T), and optionally the left and/or right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization

                  \f[ (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T ). \f]

Optionally, it also orders the eigenvalues such that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces).

The parameter jobvsl specifies the computation of the left Schur vectors:

  • 'V': The left Schur vectors of (A,B) are computed and returned in VSL.
  • 'N': The left Schur vectors of (A,B) are not computed.

The parameter jobvsr specifies the computation of the right Schur vectors:

  • 'V': The right Schur vectors of (A,B) are computed and returned in VSR.
  • 'N': The right Schur vectors of (A,B) are not computed.

Via the parameter selctg it is possible to select specific eigenvalues. selctg is a pointer to a function of three double precision floating point arguments returning an blas_int_t value. In case sort is set to 'N', selctg is not referenced, else if sort is set to 'S' selctg is used to select eigenvalues to sort to the top left of the Schur form. An eigenvalue $ (alphar[j]+alphai[j]*i)/beta[j] $ is selected if

selctg( &alphar[j], &alphai[j], &beta[j])

evaluates to true; i.e. if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. On exit, the parameter sdim will contain the number of eigenvalues (after sorting) for which selctg is true. Note that complex conjugate pairs for which selctg is true for either eigenvalue count as 2.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 1,...,n: The QZ iteration failed. (A,B) are not in Schur form, but alphar(j), alphai(j), and beta(j) should be correct for j=info,...,n-1.
  • > n: see online reference for details.

For more information on the sgges() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [4/8]

void blaze::gges ( char  jobvsl,
char  jobvsr,
char  sort,
blas_int_t(*)(const float *, const float *, const float *)  selctg,
blas_int_t  n,
float *  A,
blas_int_t  lda,
float *  B,
blas_int_t  ldb,
blas_int_t sdim,
float *  alphar,
float *  alphai,
float *  beta,
float *  VSL,
blas_int_t  ldvsl,
float *  VSR,
blas_int_t  ldvsr,
float *  work,
blas_int_t  lwork,
blas_int_t bwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric single precision column-major matrices.

Parameters
jobvsl'V' to compute the left Schur vectors, 'N' to not compute them.
jobvsr'V' to compute the right Schur vectors, 'N' to not compute them.
sort'S' to order the eigenvalues on the diagonal, 'N' to not order them (see selctg).
selctgLogical function of three single precision arguments.
nThe order of the matrices A, B, VSL, and VSR $[0..\infty)$.
APointer to the first element of the single precision column-major matrix A.
ldaThe total number of elements between two columns of the matrix A; size >= max( 1, n ).
BPointer to the first element of the single precision column-major matrix B.
ldbThe total number of elements between two columns of the matrix B; size >= max( 1, n ).
sdimReturns the number of eigenvalues (after sorting) for which selctg is true.
alpharPointer to the first element of the real part of the eigenvalue numerator; size == n.
alphaiPointer to the first element of the imaginary part of the eigenvalue numerator; size == n.
betaPointer to the first element of the eigenvalue denominator; size == n.
VSLPointer to the first element of the column-major matrix for the left Schur vectors.
ldvslThe total number of elements between two columns of the matrix VSL $[0..\infty)$.
VSRPointer to the first element of the column-major matrix for the right Schur vectors.
ldvsrThe total number of elements between two columns of the matrix VSR $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
bworkAuxiliary array; size == n.
infoReturn code of the function call.

This function computes for a pair of n-by-n single precision non-symmetric matrices (A,B) the generalized eigenvalues, the generalized real Schur form (S, T), and optionally the left and/or right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization

                  \f[ (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T ). \f]

Optionally, it also orders the eigenvalues such that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces).

The parameter jobvsl specifies the computation of the left Schur vectors:

  • 'V': The left Schur vectors of (A,B) are computed and returned in VSL.
  • 'N': The left Schur vectors of (A,B) are not computed.

The parameter jobvsr specifies the computation of the right Schur vectors:

  • 'V': The right Schur vectors of (A,B) are computed and returned in VSR.
  • 'N': The right Schur vectors of (A,B) are not computed.

Via the parameter selctg it is possible to select specific eigenvalues. selctg is a pointer to a function of three single precision floating point arguments returning a blas_int_t value. In case sort is set to 'N', selctg is not referenced, else if sort is set to 'S' selctg is used to select eigenvalues to sort to the top left of the Schur form. An eigenvalue $ (alphar[j]+alphai[j]*i)/beta[j] $ is selected if

selctg( &alphar[j], &alphai[j], &beta[j])

evaluates to true; i.e. if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected. On exit, the parameter sdim will contain the number of eigenvalues (after sorting) for which selctg is true. Note that complex conjugate pairs for which selctg is true for either eigenvalue count as 2.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 1,...,n: The QZ iteration failed. (A,B) are not in Schur form, but alphar(j), alphai(j), and beta(j) should be correct for j=info,...,n-1.
  • > n: see online reference for details.

For more information on the sgges() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [5/8]

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename MT3 , bool SO3, typename VT1 , bool TF1, typename VT2 , bool TF2, typename MT4 , bool SO4>
void blaze::gges ( DenseMatrix< MT1, SO1 > &  A,
DenseMatrix< MT2, SO2 > &  B,
DenseMatrix< MT3, SO3 > &  VSL,
DenseVector< VT1, TF1 > &  alpha,
DenseVector< VT2, TF2 > &  beta,
DenseMatrix< MT4, SO4 > &  VSR 
)
inline

LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices.

Parameters
AThe first matrix of the given pair of complex general matrices.
BThe second matrix of the given pair of complex general matrices.
VSLThe resulting complex matrix of left Schur vectors.
alphaThe resulting complex vector of eigenvalue numerators.
betaThe resulting complex vector of eigenvalue denominators.
VSRThe resulting complex matrix of right Schur vectors.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentMatrix sizes do not match.
std::invalid_argumentVector or matrix cannot be resized.
std::runtime_errorSchur factorization computation failed.

This function computes for a pair of n-by-n real non-symmetric matrices (A,B), the generalized eigenvalues, the generalized real Schur form (S,T), which on exit replaces (A, B), and the left and right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization

     \f[ (A^FA,B^FB) = ( (VSL^FL)*(S^FA)*(VSR^FR)^T, (VSL^FL)*T*(VSR^FR)^T ) \f]

where FA, FB, FL, FR are transposition flags:

  • FA == 1 if A is column-major and FA == T (transpose) if A is row-major;
  • FB == 1 if B is column-major and FB == T (transpose) if B is row-major;
  • FL == 1 if VSL is column-major and FL == T (transpose) if VSL is row-major;
  • FR == 1 if VSR is column-major and FR == T (transpose) if VSR is row-major.

A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or a ratio $ alpha/beta = w $, such that $ A - w*B $ is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0 or both being zero. The complex eigenvalues are returned as numerators and denominators in the given vectors alpha, beta, which are resized to the correct size (if possible and necessary).

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the size of the given matrices A and B don't match;
  • ... the given matrix VSL is a fixed size matrix and the size doesn't match;
  • ... the given vector alpha is a fixed size vector and the size doesn't match;
  • ... the given vector beta is a fixed size vector and the size doesn't match;
  • ... the given matrix VSR is a fixed size matrix and the size doesn't match;
  • ... the Schur factorization computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The first general matrix
DynamicMatrix<double,rowMajor> B( 5UL, 5UL ); // The second general matrix
// ... Initialization
DynamicVector<complex<double>,columnVector> alpha( 5UL ); // The vector for the eigenvalue numerators
DynamicVector<double,columnVector> beta( 5UL ); // The vector for the eigenvalue denominators
DynamicMatrix<double,columnVector> VSL( 5UL, 5UL ); // The matrix for the left Schur vectors
DynamicMatrix<double,columnVector> VSR( 5UL, 5UL ); // The matrix for the right Schur vectors
gges( A, B, VSL, alpha, beta, VSR );
void gges(char jobvsl, char jobvsr, char sort, blas_int_t(*selctg)(const float *, const float *, const float *), blas_int_t n, float *A, blas_int_t lda, float *B, blas_int_t ldb, blas_int_t *sdim, float *alphar, float *alphai, float *beta, float *VSL, blas_int_t ldvsl, float *VSR, blas_int_t ldvsr, float *work, blas_int_t lwork, blas_int_t *bwork, blas_int_t *info)
LAPACK kernel for computing the generalized Schur decomposition for a pair of non-symmetric single pr...
Definition: gges.h:227

For more information on the gges() functions (i.e. sgges(), dgges(), cgges(), and zgges()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [6/8]

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename MT3 , bool SO3, typename VT1 , bool TF1, typename VT2 , bool TF2, typename MT4 , bool SO4, typename Select >
void blaze::gges ( DenseMatrix< MT1, SO1 > &  A,
DenseMatrix< MT2, SO2 > &  B,
DenseMatrix< MT3, SO3 > &  VSL,
DenseVector< VT1, TF1 > &  alpha,
DenseVector< VT2, TF2 > &  beta,
DenseMatrix< MT4, SO4 > &  VSR,
Select  select 
)
inline

LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices.

Parameters
AThe first matrix of the given pair of complex general matrices.
BThe second matrix of the given pair of complex general matrices.
VSLThe resulting complex matrix of left Schur vectors.
alphaThe resulting complex vector of eigenvalue numerators.
betaThe resulting complex vector of eigenvalue denominators.
VSRThe resulting complex matrix of right Schur vectors.
selectLogical function for the eigenvalue selection.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentMatrix sizes do not match.
std::invalid_argumentVector or matrix cannot be resized.
std::runtime_errorSchur factorization computation failed.

This function computes for a pair of n-by-n real non-symmetric matrices (A,B), the generalized eigenvalues, the generalized real Schur form (S,T), which on exit replaces (A, B), and the left and right matrices of Schur vectors (VSL and VSR). This gives the generalized Schur factorization

     \f[ (A^FA,B^FB) = ( (VSL^FL)*(S^FA)*(VSR^FR)^T, (VSL^FL)*T*(VSR^FR)^T ) \f]

where FA, FB, FL, FR are transposition flags:

  • FA == 1 if A is column-major and FA == T (transpose) if A is row-major;
  • FB == 1 if B is column-major and FB == T (transpose) if B is row-major;
  • FL == 1 if VSL is column-major and FL == T (transpose) if VSL is row-major;
  • FR == 1 if VSR is column-major and FR == T (transpose) if VSR is row-major.

A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or a ratio $ alpha/beta = w $, such that $ A - w*B $ is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0 or both being zero. The complex eigenvalues are returned as numerators and denominators in the given vectors alpha, beta, which are resized to the correct size (if possible and necessary).

It also orders the eigenvalues such that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces). The according selection of eigenvalues is performed via the given select function. In case the given pair of matrices is a pair of real matrices the function is required to accept three pointers to real arguments, in case the given pair of matrices is a pair of complex matrices the function is required to accept two pointers to complex arguments.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the size of the given matrices A and B don't match;
  • ... the given matrix VSL is a fixed size matrix and the size doesn't match;
  • ... the given vector alpha is a fixed size vector and the size doesn't match;
  • ... the given vector beta is a fixed size vector and the size doesn't match;
  • ... the given matrix VSR is a fixed size matrix and the size doesn't match;
  • ... the Schur factorization computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The first general matrix
DynamicMatrix<double,rowMajor> B( 5UL, 5UL ); // The second general matrix
// ... Initialization
const auto select = []( T* alphar, T* alphai, T* beta ) -> blas_int_t {
return *alphar > 0.0;
};
DynamicVector<complex<double>,columnVector> alpha( 5UL ); // The vector for the eigenvalue numerators
DynamicVector<double,columnVector> beta( 5UL ); // The vector for the eigenvalue denominators
DynamicMatrix<double,columnVector> VSL( 5UL, 5UL ); // The matrix for the left Schur vectors
DynamicMatrix<double,columnVector> VSR( 5UL, 5UL ); // The matrix for the right Schur vectors
gges( A, B, VSL, alpha, beta, VSR, select );
decltype(auto) select(const DenseMatrix< MT1, SO > &cond, const DenseMatrix< MT2, SO > &lhs, const DenseMatrix< MT3, SO > &rhs)
Elementwise conditional selection of values from the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1528
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition: Types.h:64

For more information on the gges() functions (i.e. sgges(), dgges(), cgges(), and zgges()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [7/8]

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT1 , bool TF1, typename VT2 , bool TF2>
void blaze::gges ( DenseMatrix< MT1, SO1 > &  A,
DenseMatrix< MT2, SO2 > &  B,
DenseVector< VT1, TF1 > &  alpha,
DenseVector< VT2, TF2 > &  beta 
)
inline

LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices.

Parameters
AThe first matrix of the given pair of complex general matrices.
BThe second matrix of the given pair of complex general matrices.
alphaThe resulting complex vector of eigenvalue numerators.
betaThe resulting complex vector of eigenvalue denominators.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentMatrix sizes do not match.
std::invalid_argumentVector or matrix cannot be resized.
std::runtime_errorSchur factorization computation failed.

This function computes for a pair of n-by-n real non-symmetric matrices (A,B), the generalized eigenvalues and the generalized real Schur form (S,T), which on exit replaces (A, B).

A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or a ratio $ alpha/beta = w $, such that $ A - w*B $ is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0 or both being zero. The complex eigenvalues are returned as numerators and denominators in the given vectors alpha, beta, which are resized to the correct size (if possible and necessary).

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the size of the given matrices A and B don't match;
  • ... the given vector alpha is a fixed size vector and the size doesn't match;
  • ... the given vector beta is a fixed size vector and the size doesn't match;
  • ... the Schur factorization computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The first general matrix
DynamicMatrix<double,rowMajor> B( 5UL, 5UL ); // The second general matrix
// ... Initialization
DynamicVector<complex<double>,columnVector> alpha( 5UL ); // The vector for the eigenvalue numerators
DynamicVector<double,columnVector> beta( 5UL ); // The vector for the eigenvalue denominators
gges( A, B, alpha, beta );

For more information on the gges() functions (i.e. sgges(), dgges(), cgges(), and zgges()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gges() [8/8]

template<typename MT1 , bool SO1, typename MT2 , bool SO2, typename VT1 , bool TF1, typename VT2 , bool TF2, typename Select >
void blaze::gges ( DenseMatrix< MT1, SO1 > &  A,
DenseMatrix< MT2, SO2 > &  B,
DenseVector< VT1, TF1 > &  alpha,
DenseVector< VT2, TF2 > &  beta,
Select  select 
)
inline

LAPACK kernel for computing the generalized Schur factorization of the given pair of dense general matrices.

Parameters
AThe first matrix of the given pair of complex general matrices.
BThe second matrix of the given pair of complex general matrices.
alphaThe resulting complex vector of eigenvalue numerators.
betaThe resulting complex vector of eigenvalue denominators.
selectLogical function for the eigenvalue selection.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentMatrix sizes do not match.
std::invalid_argumentVector or matrix cannot be resized.
std::runtime_errorSchur factorization computation failed.

This function computes for a pair of n-by-n real non-symmetric matrices (A,B), the generalized eigenvalues and the generalized real Schur form (S,T), which on exit replaces (A, B).

A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or a ratio $ alpha/beta = w $, such that $ A - w*B $ is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0 or both being zero. The complex eigenvalues are returned as numerators and denominators in the given vectors alpha, beta, which are resized to the correct size (if possible and necessary).

It also orders the eigenvalues such that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix S and the upper triangular matrix T. The according selection of eigenvalues is performed via the given select function. In case the given pair of matrices is a pair of real matrices the function is required to accept three pointers to real arguments, in case the given pair of matrices is a pair of complex matrices the function is required to accept two pointers to complex arguments.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the size of the given matrices A and B don't match;
  • ... the given vector alpha is a fixed size vector and the size doesn't match;
  • ... the given vector beta is a fixed size vector and the size doesn't match;
  • ... the Schur factorization computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The first general matrix
DynamicMatrix<double,rowMajor> B( 5UL, 5UL ); // The second general matrix
// ... Initialization
const auto select = []( T* alphar, T* alphai, T* beta ) -> blas_int_t {
return *alphar > 0.0;
};
DynamicVector<complex<double>,columnVector> alpha( 5UL ); // The vector for the eigenvalue numerators
DynamicVector<double,columnVector> beta( 5UL ); // The vector for the eigenvalue denominators
gges( A, B, alpha, beta, select );

For more information on the gges() functions (i.e. sgges(), dgges(), cgges(), and zgges()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heev() [1/3]

void blaze::heev ( char  jobz,
char  uplo,
blas_int_t  n,
complex< double > *  A,
blas_int_t  lda,
double *  w,
complex< double > *  work,
blas_int_t  lwork,
double *  rwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian double precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= max(1,3*n-2).
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of an Hermitian n-by-n double precision complex column-major matrix based on the LAPACK zheev() function. Optionally, it computes the left and right eigenvectors. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the zheev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heev() [2/3]

void blaze::heev ( char  jobz,
char  uplo,
blas_int_t  n,
complex< float > *  A,
blas_int_t  lda,
float *  w,
complex< float > *  work,
blas_int_t  lwork,
float *  rwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= max(1,3*n-2).
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of an Hermitian n-by-n single precision complex column-major matrix based on the LAPACK cheev() function. Optionally, it computes the left and right eigenvectors. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the cheev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heev() [3/3]

template<typename MT , bool SO, typename VT , bool TF>
void blaze::heev ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  jobz,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix.

Parameters
AThe given Hermitian matrix.
wThe resulting vector of eigenvalues.
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid jobz argument provided.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a Hermitian n-by-n matrix based on the LAPACK heev() functions. Optionally, it computes the left and right eigenvectors.

The real eigenvalues are returned in ascending order in the given vector w. w is resized to the correct size (if possible and necessary). In case A is a row-major matrix, the left eigenvectors are returned in the rows of A, in case A is a column-major matrix, the right eigenvectors are returned in the columns of A.

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given jobz argument is neither 'V' nor 'N';
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases a std::invalid_argument exception is thrown.

Examples:

DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
heev( A, w, 'V', 'L' );
void heev(char jobz, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float *w, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-majo...
Definition: heev.h:138

For more information on the heev() functions (i.e. cheev() and zheev()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevd() [1/3]

void blaze::heevd ( char  jobz,
char  uplo,
blas_int_t  n,
complex< double > *  A,
blas_int_t  lda,
double *  w,
complex< double > *  work,
blas_int_t  lwork,
double *  rwork,
blas_int_t  lrwork,
blas_int_t iwork,
blas_int_t  liwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian double precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= max( 1, lrwork ).
lrworkThe dimension of the array rwork; see online reference for details.
iworkAuxiliary array; size >= max( 1, liwork ).
liworkThe dimension of the array iwork; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of an Hermitian n-by-n double precision complex column-major matrix based on the LAPACK cheevd() function. Optionally, it computes the left and right eigenvectors using a divide-and-conquer strategy. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the cheevd() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevd() [2/3]

void blaze::heevd ( char  jobz,
char  uplo,
blas_int_t  n,
complex< float > *  A,
blas_int_t  lda,
float *  w,
complex< float > *  work,
blas_int_t  lwork,
float *  rwork,
blas_int_t  lrwork,
blas_int_t iwork,
blas_int_t  liwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= max( 1, lrwork ).
lrworkThe dimension of the array rwork; see online reference for details.
iworkAuxiliary array; size >= max( 1, liwork ).
liworkThe dimension of the array iwork; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of an Hermitian n-by-n single precision complex column-major matrix based on the LAPACK cheevd() function. Optionally, it computes the left and right eigenvectors using a divide-and-conquer strategy. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the cheevd() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevd() [3/3]

template<typename MT , bool SO, typename VT , bool TF>
void blaze::heevd ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  jobz,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix.

Parameters
AThe given Hermitian matrix.
wThe resulting vector of eigenvalues.
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid jobz argument provided.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a Hermitian n-by-n matrix based on the LAPACK heevd() functions, which use a divide-and-conquer strategy. Optionally, it computes the left and right eigenvectors.

The real eigenvalues are returned in ascending order in the given vector w. w is resized to the correct size (if possible and necessary). In case A is a row-major matrix, the left eigenvectors are returned in the rows of A, in case A is a column-major matrix, the right eigenvectors are returned in the columns of A.

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given jobz argument is neither 'V' nor 'N';
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases a std::invalid_argument exception is thrown.

Examples:

DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
heevd( A, w, 'V', 'L' );
void heevd(char jobz, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float *w, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t lrwork, blas_int_t *iwork, blas_int_t liwork, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-majo...
Definition: heevd.h:143

For more information on the heevd() functions (i.e. cheevd() and zheevd()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevx() [1/6]

void blaze::heevx ( char  jobz,
char  range,
char  uplo,
blas_int_t  n,
complex< double > *  A,
blas_int_t  lda,
double  vl,
double  vu,
blas_int_t  il,
blas_int_t  iu,
double  abstol,
blas_int_t m,
double *  w,
complex< double > *  Z,
blas_int_t  ldz,
complex< double > *  work,
blas_int_t  lwork,
double *  rwork,
blas_int_t iwork,
blas_int_t ifail,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian double precision complex column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
rangeSpecifies the range of eigenvalues to find ('A', 'V', or 'I').
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
vlThe lower bound of the interval to be searched for eigenvalues (vl < vu).
vuThe upper bound of the interval to be searched for eigenvalues (vl < vu).
ilThe index of the smallest eigenvalue to be returned (0 <= il <= iu).
iuThe index of the largest eigenvalue to be returned (0 <= il <= iu).
abstolThe absolute error tolerance for the computation of the eigenvalues.
mThe total number of eigenvalues found (0 <= m <= n).
wPointer to the first element of the vector for the eigenvalues.
ZPointer to the first element of the column-major matrix for the eigenvectors.
ldzThe total number of elements between two columns of the matrix Z $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= 7*n.
iworkAuxiliary array; size >= 5*n.
ifailIndex array of eigenvectors that failed to converge.
infoReturn code of the function call.
Returns
void

This function computes a specified number of eigenvalues of a Hermitian n-by-n double precision complex column-major matrix based on the LAPACK cheevx() function. Optionally, it computes a specified number of eigenvectors. The selected real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix Z.
  • 'N': The eigenvectors of A are not computed.

The parameter range specifies the amount of eigenvalues/eigenvectors to be found:

  • '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.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the cheevx() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevx() [2/6]

void blaze::heevx ( char  jobz,
char  range,
char  uplo,
blas_int_t  n,
complex< float > *  A,
blas_int_t  lda,
float  vl,
float  vu,
blas_int_t  il,
blas_int_t  iu,
float  abstol,
blas_int_t m,
float *  w,
complex< float > *  Z,
blas_int_t  ldz,
complex< float > *  work,
blas_int_t  lwork,
float *  rwork,
blas_int_t iwork,
blas_int_t ifail,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision complex column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
rangeSpecifies the range of eigenvalues to find ('A', 'V', or 'I').
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
vlThe lower bound of the interval to be searched for eigenvalues (vl < vu).
vuThe upper bound of the interval to be searched for eigenvalues (vl < vu).
ilThe index of the smallest eigenvalue to be returned (0 <= il <= iu).
iuThe index of the largest eigenvalue to be returned (0 <= il <= iu).
abstolThe absolute error tolerance for the computation of the eigenvalues.
mThe total number of eigenvalues found (0 <= m <= n).
wPointer to the first element of the vector for the eigenvalues.
ZPointer to the first element of the column-major matrix for the eigenvectors.
ldzThe total number of elements between two columns of the matrix Z $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
rworkAuxiliary array; size >= 7*n.
iworkAuxiliary array; size >= 5*n.
ifailIndex array of eigenvectors that failed to converge.
infoReturn code of the function call.
Returns
void

This function computes a specified number of eigenvalues of a Hermitian n-by-n single precision complex column-major matrix based on the LAPACK cheevx() function. Optionally, it computes a specified number of eigenvectors. The selected real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix Z.
  • 'N': The eigenvectors of A are not computed.

The parameter range specifies the amount of eigenvalues/eigenvectors to be found:

  • '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.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the cheevx() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevx() [3/6]

template<typename MT , bool SO, typename VT , bool TF>
size_t blaze::heevx ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  uplo 
)
inline

LAPACK kernel for the eigenvalue computation of the given dense Hermitian matrix.

Parameters
AThe given Hermitian matrix.
wThe resulting vector of eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes all eigenvalues of a Hermitian n-by-n matrix based on the LAPACK heevx() functions. The real eigenvalues are returned in ascending order in the given vector w. w is resized to the correct size (if possible and necessary).

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
heevx( A, w, 'L' );
void heevx(char jobz, char range, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float vl, float vu, blas_int_t il, blas_int_t iu, float abstol, blas_int_t *m, float *w, complex< float > *Z, blas_int_t ldz, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *iwork, blas_int_t *ifail, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision complex col...
Definition: heevx.h:167

For more information on the heevx() functions (i.e. cheevx() and zheevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevx() [4/6]

template<typename MT , bool SO, typename VT , bool TF, typename ST >
size_t blaze::heevx ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  uplo,
ST  low,
ST  upp 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix.

Parameters
AThe given Hermitian matrix.
wThe resulting vector of eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
lowThe lower bound of the interval to be searched for eigenvalues.
uppThe upper bound of the interval to be searched for eigenvalues.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::invalid_argumentInvalid value range provided.
std::invalid_argumentInvalid index range provided.
std::runtime_errorEigenvalue computation failed.

This function computes a specific number of eigenvalues of a Hermitian n-by-n matrix based on the LAPACK heevx() functions. The number of eigenvalues to be computed is specified by the lower bound low and the upper bound upp, which either form an integral or a floating point range.

In case low and upp are of integral type, the function computes all eigenvalues in the index range $[low..upp]$. The num resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be a num-dimensional vector.

In case low and upp are of floating point type, the function computes all eigenvalues in the half-open interval $(low..upp]$. The resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be an n-dimensional vector.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given scalar values don't form a proper range;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
heevx( A, w, 'L', 1.0, 2.0 ); // Computes all eigenvalues in the interval (1..2]
DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 3UL ); // The vector for the real eigenvalues
heevx( A, w, 'L', 0, 2 ); // Computes the first three eigenvalues

For more information on the heevx() functions (i.e. cheevx() and zheevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevx() [5/6]

template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2>
size_t blaze::heevx ( DenseMatrix< MT1, SO1 > &  A,
DenseVector< VT, TF > &  w,
DenseMatrix< MT2, SO2 > &  Z,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix.

Parameters
AThe given Hermitian matrix.
wThe resulting vector of eigenvalues.
ZThe resulting matrix of eigenvectors.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes all eigenvalues of a Hermitian n-by-n matrix based on the LAPACK heevx() functions. Additionally, it computes all eigenvectors of A. The real eigenvalues are returned in ascending order in the given vector w. The eigenvectors are returned in the rows of Z in case Z is a row-major matrix and in the columns of Z in case Z is a column-major matrix. Both w and Z are resized to the correct dimensions (if possible and necessary).

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given matrix Z is a fixed size matrix and the dimensions don't match;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
DynamicMatrix<complex<double>,rowMajor> Z( 5UL, 5UL ); // The matrix for the complex eigenvectors
heevx( A, w, 'L' );

For more information on the heevx() functions (i.e. cheevx() and zheevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ heevx() [6/6]

template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2, typename ST >
size_t blaze::heevx ( DenseMatrix< MT1, SO1 > &  A,
DenseVector< VT, TF > &  w,
DenseMatrix< MT2, SO2 > &  Z,
char  uplo,
ST  low,
ST  upp 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense Hermitian matrix.

Parameters
AThe given Hermitian matrix.
wThe resulting vector of eigenvalues.
ZThe resulting matrix of eigenvectors.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
lowThe lower bound of the interval to be searched for eigenvalues.
uppThe upper bound of the interval to be searched for eigenvalues.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::invalid_argumentInvalid value range provided.
std::invalid_argumentInvalid index range provided.
std::runtime_errorEigenvalue computation failed.

This function computes a specific number of eigenvalues of a Hermitian n-by-n matrix based on the LAPACK heevx() functions. Additionally, it computes a specific number of eigenvectors of A. The number of eigenvalues to be computed is specified by the lower bound low and the upper bound upp, which either form an integral or a floating point range.

In case low and upp are of integral type, the function computes all eigenvalues in the index range $[low..upp]$. The num resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be a num-dimensional vector. The eigenvectors are returned in the rows of Z in case Z is row-major matrix and in the columns of Z in case Z is a column-major matrix. Z is resized (if possible) or expected to be a num-by-n row-major matrix or a n-by-num column-major matrix.

In case low and upp are of floating point type, the function computes all eigenvalues in the half-open interval $(low..upp]$. The resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be an n-dimensional vector. The eigenvectors are returned in the rows of Z in case Z is a row-major matrix and in the columns of Z in case Z is a column-major matrix. Z is resized (if possible) or expected to be a n-by-n matrix.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given matrix Z is a fixed size matrix and the dimensions don't match;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
DynamicMatrix<complex<double>,rowMajor> Z( 5UL, 5UL ); // The matrix for the complex eigenvectors
heevx( A, w, Z, 'L', 1.0, 2.0 ); // Computes all eigenvalues in the interval (1..2]
DynamicMatrix<complex<double>,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 3UL ); // The vector for the real eigenvalues
DynamicMatrix<complex<double>,rowMajor> Z( 3UL, 5UL ); // The matrix for the complex eigenvectors
heevx( A, w, Z, 'L', 0, 2 ); // Computes the first three eigenvalues

For more information on the heevx() functions (i.e. cheevx() and zheevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syev() [1/3]

void blaze::syev ( char  jobz,
char  uplo,
blas_int_t  n,
double *  A,
blas_int_t  lda,
double *  w,
double *  work,
blas_int_t  lwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric double precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a symmetric n-by-n double precision column-major matrix based on the LAPACK dsyev() function. Optionally, it computes the left and right eigenvectors. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the dsyev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syev() [2/3]

void blaze::syev ( char  jobz,
char  uplo,
blas_int_t  n,
float *  A,
blas_int_t  lda,
float *  w,
float *  work,
blas_int_t  lwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a symmetric n-by-n single precision column-major matrix based on the LAPACK ssyev() function. Optionally, it computes the left and right eigenvectors. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the ssyev() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syev() [3/3]

template<typename MT , bool SO, typename VT , bool TF>
void blaze::syev ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  jobz,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.

Parameters
AThe given symmetric matrix.
wThe resulting vector of eigenvalues.
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid jobz argument provided.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a symmetric n-by-n matrix based on the LAPACK syev() functions. Optionally, it computes the left or right eigenvectors.

The real eigenvalues are returned in ascending order in the given vector w. w is resized to the correct size (if possible and necessary). In case A is a row-major matrix, the left eigenvectors are returned in the rows of A, in case A is a column-major matrix, the right eigenvectors are returned in the columns of A.

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given jobz argument is neither 'V' nor 'N';
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases a std::invalid_argument exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The symmetric matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
syev( A, w, 'V', 'L' );
void syev(char jobz, char uplo, blas_int_t n, float *A, blas_int_t lda, float *w, float *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-majo...
Definition: syev.h:135

For more information on the syev() functions (i.e. ssyev() and dsyev()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevd() [1/3]

void blaze::syevd ( char  jobz,
char  uplo,
blas_int_t  n,
double *  A,
blas_int_t  lda,
double *  w,
double *  work,
blas_int_t  lwork,
blas_int_t iwork,
blas_int_t  liwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric double precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
iworkAuxiliary array; size >= max( 1, liwork ).
liworkThe dimension of the array iwork; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a symmetric n-by-n double precision column-major matrix based on the LAPACK ssyevd() function. Optionally, it computes the left and right eigenvectors using a divide-and-conquer strategy. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the ssyevd() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevd() [2/3]

void blaze::syevd ( char  jobz,
char  uplo,
blas_int_t  n,
float *  A,
blas_int_t  lda,
float *  w,
float *  work,
blas_int_t  lwork,
blas_int_t iwork,
blas_int_t  liwork,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
wPointer to the first element of the vector for the eigenvalues.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
iworkAuxiliary array; size >= max( 1, liwork ).
liworkThe dimension of the array iwork; see online reference for details.
infoReturn code of the function call.
Returns
void

This function computes the eigenvalues of a symmetric n-by-n single precision column-major matrix based on the LAPACK ssyevd() function. Optionally, it computes the left and right eigenvectors using a divide-and-conquer strategy. The real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix A.
  • 'N': The eigenvectors of A are not computed.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the ssyevd() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevd() [3/3]

template<typename MT , bool SO, typename VT , bool TF>
void blaze::syevd ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  jobz,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.

Parameters
AThe given symmetric matrix.
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
wThe resulting vector of eigenvalues.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid jobz argument provided.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes the eigenvalues of a symmetric n-by-n matrix based on the LAPACK syevd() functions, which use a divide-and-conquer strategy. Optionally, it computes the left or right eigenvectors.

The real eigenvalues are returned in ascending order in the given vector w. w is resized to the correct size (if possible and necessary). In case A is a row-major matrix, the left eigenvectors are returned in the rows of A, in case A is a column-major matrix, the right eigenvectors are returned in the columns of A.

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given jobz argument is neither 'V' nor 'N';
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases a std::invalid_argument exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The symmetric matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
syevd( A, w, 'V', 'L' );
void syevd(char jobz, char uplo, blas_int_t n, float *A, blas_int_t lda, float *w, float *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t liwork, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-majo...
Definition: syevd.h:141

For more information on the syevd() functions (i.e. ssyevd() and dsyevd()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevx() [1/6]

void blaze::syevx ( char  jobz,
char  range,
char  uplo,
blas_int_t  n,
double *  A,
blas_int_t  lda,
double  vl,
double  vu,
blas_int_t  il,
blas_int_t  iu,
double  abstol,
blas_int_t m,
double *  w,
double *  Z,
blas_int_t  ldz,
double *  work,
blas_int_t  lwork,
blas_int_t iwork,
blas_int_t ifail,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric double precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
rangeSpecifies the range of eigenvalues to find ('A', 'V', or 'I').
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
vlThe lower bound of the interval to be searched for eigenvalues (vl < vu).
vuThe upper bound of the interval to be searched for eigenvalues (vl < vu).
ilThe index of the smallest eigenvalue to be returned (0 <= il <= iu).
iuThe index of the largest eigenvalue to be returned (0 <= il <= iu).
abstolThe absolute error tolerance for the computation of the eigenvalues.
mThe total number of eigenvalues found (0 <= m <= n).
wPointer to the first element of the vector for the eigenvalues.
ZPointer to the first element of the column-major matrix for the eigenvectors.
ldzThe total number of elements between two columns of the matrix Z $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
iworkAuxiliary array; size >= 5*n.
ifailIndex array of eigenvectors that failed to converge.
infoReturn code of the function call.
Returns
void

This function computes a specified number of eigenvalues of a symmetric n-by-n double precision column-major matrix based on the LAPACK dsyevx() function. Optionally, it computes a specified number of eigenvectors. The selected real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix Z.
  • 'N': The eigenvectors of A are not computed.

The parameter range specifies the amount of eigenvalues/eigenvectors to be found:

  • '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.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the dsyevx() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevx() [2/6]

void blaze::syevx ( char  jobz,
char  range,
char  uplo,
blas_int_t  n,
float *  A,
blas_int_t  lda,
float  vl,
float  vu,
blas_int_t  il,
blas_int_t  iu,
float  abstol,
blas_int_t m,
float *  w,
float *  Z,
blas_int_t  ldz,
float *  work,
blas_int_t  lwork,
blas_int_t iwork,
blas_int_t ifail,
blas_int_t info 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-major matrix.

Parameters
jobz'V' to compute the eigenvectors of A, 'N' to only compute the eigenvalues.
rangeSpecifies the range of eigenvalues to find ('A', 'V', or 'I').
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows and columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
vlThe lower bound of the interval to be searched for eigenvalues (vl < vu).
vuThe upper bound of the interval to be searched for eigenvalues (vl < vu).
ilThe index of the smallest eigenvalue to be returned (0 <= il <= iu).
iuThe index of the largest eigenvalue to be returned (0 <= il <= iu).
abstolThe absolute error tolerance for the computation of the eigenvalues.
mThe total number of eigenvalues found (0 <= m <= n).
wPointer to the first element of the vector for the eigenvalues.
ZPointer to the first element of the column-major matrix for the eigenvectors.
ldzThe total number of elements between two columns of the matrix Z $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; see online reference for details.
iworkAuxiliary array; size >= 5*n.
ifailIndex array of eigenvectors that failed to converge.
infoReturn code of the function call.
Returns
void

This function computes a specified number of eigenvalues of a symmetric n-by-n single precision column-major matrix based on the LAPACK ssyevx() function. Optionally, it computes a specified number of eigenvectors. The selected real eigenvalues are returned in ascending order in the given n-dimensional vector w.

The parameter jobz specifies the computation of the orthonormal eigenvectors of A:

  • 'V': The eigenvectors of A are computed and returned within the matrix Z.
  • 'N': The eigenvectors of A are not computed.

The parameter range specifies the amount of eigenvalues/eigenvectors to be found:

  • '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.

The info argument provides feedback on the success of the function call:

  • = 0: The computation finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the algorithm failed to converge; i values did not converge to zero.

For more information on the ssyevx() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevx() [3/6]

template<typename MT , bool SO, typename VT , bool TF>
size_t blaze::syevx ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.

Parameters
AThe given symmetric matrix.
wThe resulting vector of eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes all eigenvalues of a symmetric n-by-n matrix based on the LAPACK syevx() functions. The real eigenvalues are returned in ascending order in the given vector w. w is resized to the correct size (if possible and necessary).

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The symmetric matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
syevx( A, w, 'L' );
void syevx(char jobz, char range, char uplo, blas_int_t n, float *A, blas_int_t lda, float vl, float vu, blas_int_t il, blas_int_t iu, float abstol, blas_int_t *m, float *w, float *Z, blas_int_t ldz, float *work, blas_int_t lwork, blas_int_t *iwork, blas_int_t *ifail, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-majo...
Definition: syevx.h:166

For more information on the syevx() functions (i.e. ssyevx() and dsyevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevx() [4/6]

template<typename MT , bool SO, typename VT , bool TF, typename ST >
size_t blaze::syevx ( DenseMatrix< MT, SO > &  A,
DenseVector< VT, TF > &  w,
char  uplo,
ST  low,
ST  upp 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.

Parameters
AThe given symmetric matrix.
wThe resulting vector of eigenvalues.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
lowThe lower bound of the interval to be searched for eigenvalues.
uppThe upper bound of the interval to be searched for eigenvalues.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::invalid_argumentInvalid value range provided.
std::invalid_argumentInvalid index range provided.
std::runtime_errorEigenvalue computation failed.

This function computes a specific number of eigenvalues of a symmetric n-by-n matrix based on the LAPACK syevx() functions. The number of eigenvalues to be computed is specified by the lower bound low and the upper bound upp, which either form an integral or a floating point range.

In case low and upp are of integral type, the function computes all eigenvalues in the index range $[low..upp]$. The num resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be a num-dimensional vector.

In case low and upp are of floating point type, the function computes all eigenvalues in the half-open interval $(low..upp]$. The resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be an n-dimensional vector.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given scalar values don't form a proper range;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The symmetric matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
syevx( A, w, 'L', 1.0, 2.0 ); // Computes all eigenvalues in the interval (1..2]
DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The symmetric matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 3UL ); // The vector for the real eigenvalues
syevx( A, w, 'L', 0, 2 ); // Computes the first three eigenvalues

For more information on the syevx() functions (i.e. ssyevx() and dsyevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevx() [5/6]

template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2>
size_t blaze::syevx ( DenseMatrix< MT1, SO1 > &  A,
DenseVector< VT, TF > &  w,
DenseMatrix< MT2, SO2 > &  Z,
char  uplo 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.

Parameters
AThe given symmetric matrix.
wThe resulting vector of eigenvalues.
ZThe resulting matrix of eigenvectors.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorEigenvalue computation failed.

This function computes all eigenvalues of a symmetric n-by-n matrix based on the LAPACK syevx() functions. Additionally, it computes all eigenvectors of A. The real eigenvalues are returned in ascending order in the given vector w. The eigenvectors are returned in the rows of Z in case Z is a row-major matrix and in the columns of Z in case Z is a column-major matrix. Both w and Z are resized to the correct dimensions (if possible and necessary).

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given matrix Z is a fixed size matrix and the dimensions don't match;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The symmetric matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
DynamicMatrix<double,rowMajor> Z( 5UL, 5UL ); // The matrix for the real eigenvectors
syevx( A, w, 'L' );

For more information on the syevx() functions (i.e. ssyevx() and dsyevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ syevx() [6/6]

template<typename MT1 , bool SO1, typename VT , bool TF, typename MT2 , bool SO2, typename ST >
size_t blaze::syevx ( DenseMatrix< MT1, SO1 > &  A,
DenseVector< VT, TF > &  w,
DenseMatrix< MT2, SO2 > &  Z,
char  uplo,
ST  low,
ST  upp 
)
inline

LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.

Parameters
AThe given symmetric matrix.
wThe resulting vector of eigenvalues.
ZThe resulting matrix of eigenvectors.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
lowThe lower bound of the interval to be searched for eigenvalues.
uppThe upper bound of the interval to be searched for eigenvalues.
Returns
The total number of eigenvalues found.
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentVector cannot be resized.
std::invalid_argumentMatrix cannot be resized.
std::invalid_argumentInvalid uplo argument provided.
std::invalid_argumentInvalid value range provided.
std::invalid_argumentInvalid index range provided.
std::runtime_errorEigenvalue computation failed.

This function computes a specific number of eigenvalues of a symmetric n-by-n matrix based on the LAPACK syevx() functions. Additionally, it computes a specific number of eigenvectors of A. The number of eigenvalues to be computed is specified by the lower bound low and the upper bound upp, which either form an integral or a floating point range.

In case low and upp are of integral type, the function computes all eigenvalues in the index range $[low..upp]$. The num resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be a num-dimensional vector. The eigenvectors are returned in the rows of Z in case Z is row-major matrix and in the columns of Z in case Z is a column-major matrix. Z is resized (if possible) or expected to be a num-by-n row-major matrix or a n-by-num column-major matrix.

In case low and upp are of floating point type, the function computes all eigenvalues in the half-open interval $(low..upp]$. The resulting real eigenvalues are stored in ascending order in the given vector w, which is either resized (if possible) or expected to be an n-dimensional vector. The eigenvectors are returned in the rows of Z in case Z is a row-major matrix and in the columns of Z in case Z is a column-major matrix. Z is resized (if possible) or expected to be a n-by-n matrix.

Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The function fails if ...

  • ... the given matrix A is not a square matrix;
  • ... the given vector w is a fixed size vector and the size doesn't match;
  • ... the given matrix Z is a fixed size matrix and the dimensions don't match;
  • ... the given uplo argument is neither 'L' nor 'U';
  • ... the eigenvalue computation fails.

In all failure cases an exception is thrown.

Examples:

DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 5UL ); // The vector for the real eigenvalues
DynamicMatrix<double,rowMajor> Z( 5UL, 5UL ); // The matrix for the real eigenvectors
syevx( A, w, Z, 'L', 1.0, 2.0 ); // Computes all eigenvalues in the interval (1..2]
DynamicMatrix<double,rowMajor> A( 5UL, 5UL ); // The Hermitian matrix A
// ... Initialization
DynamicVector<double,columnVector> w( 3UL ); // The vector for the real eigenvalues
DynamicMatrix<double,rowMajor> Z( 3UL, 5UL ); // The matrix for the real eigenvectors
syevx( A, w, Z, 'L', 0, 2 ); // Computes the first three eigenvalues

For more information on the syevx() functions (i.e. ssyevx() and dsyevx()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.