unghr(3)
π unghr β the manual page, but make it make sense
okay bestie, gather round, because we're about to talk about unghr(3) β that's the family name for {un,or}ghr, and no I'm not kidding, that's literally how the page writes it. lower-case un, comma, or, then ghr. it's giving "the naming committee was running late" but we respect it π
the whole personality of this little guy is: generate Q from gehrd. that's the entire NAME section. that's the mission. gehrd did a thing, and now somebody has to build Q, and that somebody is this function. no cap. π«Ά
β¨ NAME β¨
unghr β {un,or}ghr: generate Q from gehrd
like literally that's it, that's the name line. it doesn't want to elaborate. it's mysterious. main character energy fr π₯
π¦ SYNOPSIS π¦
Functions
bestie there are four of them and they all take the exact same arguments, which is lowkey iconic of them ngl. one per precision, one per vibe. here we go:
subroutine cunghr (n, ilo, ihi, a, lda, tau, work, lwork, info)βCUNGHR. complex, single precision, and yes thecis doing a lot of work in that name πsubroutine dorghr (n, ilo, ihi, a, lda, tau, work, lwork, info)βDORGHR. double precision, but real β thedstands for "doing the most, in double" πsubroutine sorghr (n, ilo, ihi, a, lda, tau, work, lwork, info)βSORGHR. single precision, real, the budget-friendly icon of the group πsubroutine zunghr (n, ilo, ihi, a, lda, tau, work, lwork, info)βZUNGHR. complex and double precision, aka the deluxe edition, aka the one that eats π
so if you're squinting at that list: yes, the full argument list is identical across all four. same order, same names, every single time:
(n, ilo, ihi, a, lda, tau, work, lwork, info)
and the all-caps name next to each one β CUNGHR, DORGHR, SORGHR, ZUNGHR β is exactly how it's written in the page, so keep them uppercase when you're yelling about them in the group chat. β
ngl the synopsis is doing that thing where it tells you the shape of the thing but not the lore. the lore is coming, bestie, don't worry.
πΈ Detailed Description πΈ
okay so here's the thing β the page goes straight from the header into a Detailed Description section, and up to this point in the pageβ¦ that's it. it's the section heading and nothing else so far. no paragraphs, no dorgqr-style life story, not a single prose line. the description is literally just chillin' there, waiting for the rest of its content to show up π
and look β I'm not gonna sit here and invent lore for you, because that would be making stuff up and that's not the vibe. everything past this point is in the next chunk of the page. so consider this a vibe check passed and a "to be continuedβ¦" delivery π¦β¨
part 1: done. part 2: incoming. don't go anywhere π«Ά
π FUNCTION DOCUMENTATION
π¦ cunghr β complex unitary, but make it fashion
subroutine cunghr (integer n, integer ilo, integer ihi, complex, dimension( lda, * ) a, integer lda, complex, dimension( * ) tau, complex, dimension( * ) work, integer lwork, integer info)
CUNGHR is the complex unitary glow-up bestie β it builds Q for you and it is not here to be subtle.
π― Purpose
CUNGHR generates a complex unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by CGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).
πΈ Parameters
NβNisINTEGER. The order of the matrixQ.N >= 0.ILOβILOisINTEGER. Thatβs the whole note, bestie β no extra lore.IHIβIHIisINTEGER.ILOandIHImust have the same values as in the previous call ofCGEHRD.Qis equal to the unit matrix except in the submatrixQ(ilo+1:ihi,ilo+1:ihi).1 <= ILO <= IHI <= N, ifN > 0;ILO=1andIHI=0, ifN=0.AβAisCOMPLEXarray, dimension(LDA,N). On entry, the vectors which define the elementary reflectors, as returned byCGEHRD. On exit, theN-by-Nunitary matrixQ.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).TAUβTAUisCOMPLEXarray, dimension(N-1).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byCGEHRD.WORKβWORKisCOMPLEXarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= IHI-ILO. For optimum performanceLWORK >= (IHI-ILO)*NB, whereNBis the optimal blocksize. IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.INFOβINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 125 of file cunghr.f.
π dorghr β double-precision orthogonal realness
subroutine dorghr (integer n, integer ilo, integer ihi, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) tau, double precision, dimension( * ) work, integer lwork, integer info)
DORGHR is giving real orthogonal main character energy, and yes, it is built from the reflectors that DGEHRD handed you.
π― Purpose
DORGHR generates a real orthogonal matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by DGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).
πΈ Parameters
NβNisINTEGER. The order of the matrixQ.N >= 0.ILOβILOisINTEGER. Short and sweet, no extra details.IHIβIHIisINTEGER.ILOandIHImust have the same values as in the previous call ofDGEHRD.Qis equal to the unit matrix except in the submatrixQ(ilo+1:ihi,ilo+1:ihi).1 <= ILO <= IHI <= N, ifN > 0;ILO=1andIHI=0, ifN=0.AβAisDOUBLE PRECISIONarray, dimension(LDA,N). On entry, the vectors which define the elementary reflectors, as returned byDGEHRD. On exit, theN-by-Northogonal matrixQ.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).TAUβTAUisDOUBLE PRECISIONarray, dimension(N-1).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byDGEHRD.WORKβWORKisDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= IHI-ILO. For optimum performanceLWORK >= (IHI-ILO)*NB, whereNBis the optimal blocksize. IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.INFOβINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 125 of file dorghr.f.
π sorghr β single-precision real orthogonal, slaying
subroutine sorghr (integer n, integer ilo, integer ihi, real, dimension( lda, * ) a, integer lda, real, dimension( * ) tau, real, dimension( * ) work, integer lwork, integer info)
SORGHR is the real orthogonal bestie for your SGEHRD era. Same energy, single precision, zero chill.
π― Purpose
SORGHR generates a real orthogonal matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by SGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).
πΈ Parameters
NβNisINTEGER. The order of the matrixQ.N >= 0.ILOβILOisINTEGER. Thatβs it β iconic brevity.IHIβIHIisINTEGER.ILOandIHImust have the same values as in the previous call ofSGEHRD.Qis equal to the unit matrix except in the submatrixQ(ilo+1:ihi,ilo+1:ihi).1 <= ILO <= IHI <= N, ifN > 0;ILO=1andIHI=0, ifN=0.AβAisREALarray, dimension(LDA,N). On entry, the vectors which define the elementary reflectors, as returned bySGEHRD. On exit, theN-by-Northogonal matrixQ.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).TAUβTAUisREALarray, dimension(N-1).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned bySGEHRD.WORKβWORKisREALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= IHI-ILO. For optimum performanceLWORK >= (IHI-ILO)*NB, whereNBis the optimal blocksize. IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.INFOβINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 125 of file sorghr.f.
π¦ zunghr β complex*16 unitary, absolutely ate
subroutine zunghr (integer n, integer ilo, integer ihi, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( * ) tau, complex*16, dimension( * ) work, integer lwork, integer info)
ZUNGHR is the complex*16 unitary queen of the group β ZGEHRD gave you the reflectors, and this routine turns them into the full Q.
π― Purpose
ZUNGHR generates a complex unitary matrix Q which is defined as the product of IHI-ILO elementary reflectors of order N, as returned by ZGEHRD:
Q = H(ilo) H(ilo+1) . . . H(ihi-1).
πΈ Parameters
NβNisINTEGER. The order of the matrixQ.N >= 0.ILOβILOisINTEGER. No extra commentary, just vibes.IHIβIHIisINTEGER.ILOandIHImust have the same values as in the previous call ofZGEHRD.Qis equal to the unit matrix except in the submatrixQ(ilo+1:ihi,ilo+1:ihi).1 <= ILO <= IHI <= N, ifN > 0;ILO=1andIHI=0, ifN=0.AβAisCOMPLEX*16array, dimension(LDA,N). On entry, the vectors which define the elementary reflectors, as returned byZGEHRD. On exit, theN-by-Nunitary matrixQ.LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).TAUβTAUisCOMPLEX*16array, dimension(N-1).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byZGEHRD.WORKβWORKisCOMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= IHI-ILO. For optimum performanceLWORK >= (IHI-ILO)*NB, whereNBis the optimal blocksize. IfLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.INFOβINFOisINTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 125 of file zunghr.f.
π AUTHOR π
Okay so nobody actually wrote this page by hand, bestie β it's generated automatically by Doxygen for LAPACK from the source code. That's the whole origin story. The docs literally build themselves from the code, which is honestly iconic of them. π
So yeah β no mysterious midnight manpage poet to thank here, just Doxygen doing its little automated slay, pulling straight from the LAPACK source so the docs and the code stay in sync. No cap, that's the vibe. β¨
And that's a wrap on unghr(3), bestie β you made it to the end! π«Ά Go forth and generate those Q matrices with confidence. π
This beauty comes to you courtesy of LAPACK, Version 3.12.0 β the unghr(3) page, straight from the source, no cap. π¦ Bye bestie, ily, go slay some linear algebra! π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms