lapacke_zheevx.c(3)

πŸ“¦ version 3.9.0, in centos-stream 9

πŸ’… 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 line 36 of file lapacke_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 indices il through iu. very "I know what I'm about" energy. πŸ’…
  • uplo β€” which triangle of a holds 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 matrix a. it's an n-by-n situation. the dimensions are dimensioning. πŸ“
  • a β€” your complex Hermitian matrix, n by n. it's lapack_complex_double * so like, an array of complex doubles. on exit it gets overwritten (more on that below, don't panic). πŸ¦‹
  • lda β€” leading dimension of a. 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 if range is set to 'V'. if range is anything else, bestie it's just sitting there unbothered. πŸ’€
  • vu β€” upper bound of the eigenvalue interval. same deal: only referenced if range is 'V'. they're a package deal. πŸŽ€
  • il β€” lower index of the eigenvalues you want (1-based indexing, in ascending order). only referenced if range is 'I'. 😭
  • iu β€” upper index of the eigenvalues you want. only referenced if range is '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|| * eps where T is the tridiagonal matrix from the reduction and eps is the machine precision. lowkey obsessed with precision. 🧚
  • m β€” on exit, the total number of eigenvalues found. if range is 'A', m is literally n. iconic. 🫢
  • w β€” on exit, the eigenvalues in ascending order. first m elements if range is 'V' or 'I'. if info is successful, they're the real deal. hold onto them. πŸ’–
  • z β€” on exit, the eigenvectors. it's n by n if jobz is 'V'. each column contains an eigenvector for the corresponding eigenvalue in w. the first m columns if range is 'V' or 'I'. the vectors are normalized to have Euclidean norm 1. literally flawless. 🌟
  • ldz β€” leading dimension of z. if jobz is 'V', ldz >= max(1, n). if jobz is 'N', ldz >= 1. keep it consistent bestie. 🌈
  • ifail β€” the index of the first eigenvector that failed to converge. on exit, if info equals i (e.g. info = 1), the first i columns of z are fine, but the ifail array 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 β€” the i-th argument had an illegal value. not a vibe. 😭
  • i (positive) β€” i eigenvectors failed to converge. the i-th eigenvector is the issue. check ifail. πŸ™ˆ

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 πŸ’€

  • a and z are 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 > 0 after the call, the first i eigenpairs converged but the rest are suspect. you'll need the ifail array from the full LAPACK version to pinpoint exactly which ones need a moment. it's giving "don't ignore the red flags." 🌈
  • vl, vu are only referenced if range='V'. il, iu are only referenced if range='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, first m elements if selected)
  • eigenvectors in z (normalized to norm 1, each column is an eigenvector for the corresponding eigenvalue in w)
  • m tells you how many eigenvalues you actually got
  • ifail flags 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