lapacke_zheevx.c(3)
π lapacke_zheevx.c β bestie edition π
okay so welcome to the LAPACK manual page for lapacke_zheevx.c. this is the tea on how to make the complex Hermitian eigenvalue problem absolutely slay for you. no cap. π
β¨ NAME β¨
lapacke_zheevx.c β like, the actual C file where LAPACKE_zheevx lives. we stan a whole icon. π
π¦ SYNOPSIS π¦
#include 'lapacke_utils.h'
π Functions π
lapack_int LAPACKE_zheevx(int matrix_layout,char jobz,char range,char uplo,lapack_int n,lapack_complex_double *a,lapack_int lda,double vl,double vu,lapack_int il,lapack_int iu,double abstol,lapack_int *m,double *w,lapack_complex_double *z,lapack_int ldz,lapack_int *ifail) π
πΈ Function Documentation πΈ
π«Ά lapack_int LAPACKE_zheevx
okay so here's the full glow-up. the signature literally is:
lapack_int LAPACKE_zheevx (int matrix_layout, char jobz, char range, char
uplo, lapack_int n, lapack_complex_double * a, lapack_int lda, double
vl, double vu, lapack_int il, lapack_int iu, double abstol, lapack_int *
m, double * w, lapack_complex_double * z, lapack_int ldz, lapack_int *
ifail)
definition at line36of filelapacke_zheevx.c. not me knowing exactly where the vibes start πβ¨
this function helps you compute selected eigenvalues and eigenvectors of a complex Hermitian matrix. it's giving "I know exactly what I want and I'm not settling" energy. the way it lets you pick your range, your tolerance, your layout? main character energy fr fr. π₯
π the parameters (all of them, no skipping, periodt) π
matrix_layoutβ tells LAPACK whether your matrices are stored column-major (LAPACK_COL_MAJOR) or row-major (LAPACK_ROW_MAJOR). pick one and commit bestie, indecision isn't the vibe. πjobzβ what you want computed:'N'β eigenvalues only, no eigenvectors. lowkey minimalist, we respect it.'V'β eigenvalues and eigenvectors. the full package. slay. β¨
rangeβ where to look for eigenvalues:'A'β all eigenvalues. go off.'V'β only eigenvalues in the half-open interval(vl, vu]. specific but iconic.'I'β only eigenvalues with indicesilthroughiu. very "I know what I'm about" energy. π
uploβ which triangle ofaholds your data:'U'β upper triangle. only the top half matters, king.'L'β lower triangle. the bottom half is running the show.
nβ order of the matrixa. it's ann-by-nsituation. the dimensions are dimensioning. πaβ your complex Hermitian matrix,nbyn. it'slapack_complex_double *so like, an array of complex doubles. on exit it gets overwritten (more on that below, don't panic). π¦ldaβ leading dimension ofa. for column-major,lda >= max(1, n). for row-major,lda >= max(1, n). yes queen, it's the same rule. don't come for me. πΈvlβ lower bound of the eigenvalue interval. only referenced ifrangeis set to'V'. ifrangeis anything else, bestie it's just sitting there unbothered. πvuβ upper bound of the eigenvalue interval. same deal: only referenced ifrangeis'V'. they're a package deal. πilβ lower index of the eigenvalues you want (1-based indexing, in ascending order). only referenced ifrangeis'I'. πiuβ upper index of the eigenvalues you want. only referenced ifrangeis'I'. il and iu are literally me and my bestie. πabstolβ the absolute error tolerance for eigenvalues. LAPACK calls this "the absolute error tolerance for the eigenvalues." the convergence check is very strict:abstol <= ||T|| * epswhereTis the tridiagonal matrix from the reduction andepsis the machine precision. lowkey obsessed with precision. π§mβ on exit, the total number of eigenvalues found. ifrangeis'A',mis literallyn. iconic. π«Άwβ on exit, the eigenvalues in ascending order. firstmelements ifrangeis'V'or'I'. ifinfois successful, they're the real deal. hold onto them. πzβ on exit, the eigenvectors. it'snbynifjobzis'V'. each column contains an eigenvector for the corresponding eigenvalue inw. the firstmcolumns ifrangeis'V'or'I'. the vectors are normalized to have Euclidean norm 1. literally flawless. πldzβ leading dimension ofz. ifjobzis'V',ldz >= max(1, n). ifjobzis'N',ldz >= 1. keep it consistent bestie. πifailβ the index of the first eigenvector that failed to converge. on exit, ifinfoequalsi(e.g.info = 1), the firsticolumns ofzare fine, but theifailarray will point to the ones that need help. it's literally the trouble index. no cap. π¦
π the return value π
the function returns an lapack_int. here's the tea:
0β success. everything slayed. β¨-iβ thei-th argument had an illegal value. not a vibe. πi(positive) βieigenvectors failed to converge. the i-th eigenvector is the issue. checkifail. π
so basically if the return value isn't 0, you're having a moment. keep it moving and check info in the full version, but this wrapper is like "here's your return, do with it what you will." π
π warnings & lowkey important stuff π
aandzare overwritten. don't come crying if you forget to copy your originals. π- the eigenvectors are normalized to have Euclidean norm 1, and the largest component of each eigenvector is real and positive. the way that's a whole standard. π
- if
info = i > 0after the call, the firstieigenpairs converged but the rest are suspect. you'll need theifailarray from the full LAPACK version to pinpoint exactly which ones need a moment. it's giving "don't ignore the red flags." π vl,vuare only referenced ifrange='V'.il,iuare only referenced ifrange='I'. the others are just chilling in the background. π§
π flirty little summary of what it does π
this function computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian matrix A. eigenvalues can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. it's literally giving "I can be specific or I can have it all"βand honestly? both are valid. π
the output:
- eigenvalues in
w(ascending order, firstmelements if selected) - eigenvectors in
z(normalized to norm 1, each column is an eigenvector for the corresponding eigenvalue inw) mtells you how many eigenvalues you actually gotifailflags any convergence issues
it's the LAPACK equivalent of a bestie who always shows up with exactly what you asked for, plus receipts. main character energy fr fr. π
π Author π
generated automatically by Doxygen for LAPACK from the source code. not a real person but a whole icon. slay, Doxygen. π
π SEE ALSO π
ngl the original page doesn't have a SEE ALSO section for this particular file, but if it did, you know it would be full of other LAPACKE functions trying to get a moment. π
okay so that's the whole entire vibe check on lapacke_zheevx.c. it's a LAPACK 3.8.0 classic that dropped on Tue Nov 14 2017 β a whole era. remember to include lapacke_utils.h and always check your info. stay slay, check your lda, and don't let your abstol be too small unless you're ready to wait. periodt. πβ¨ππ¦πΈπ
π«Άππ₯ππβππππ§π
π¦ where this page comes from
- centos-stream 9: lapack 3.9.0-10.el9 Β· BSD
- centos-stream 9: lapack 3.9.0-10.el9 Β· BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms