unmhr(3)

πŸ’… unmhr(3) β€” straight out of the Library Functions Manual πŸŽ€

okay so bestie, buckle up πŸ’– this is the page for unmhr, and it's a whole family situation β€” four routines, all of them doing the same iconic little dance: you've got a matrix C, you've got a Q that came out of gehrd, and these functions multiply them together. slay. let's go 🌸


🌸 NAME 🌸

unmhr β€” {un,or}mhr: multiply by Q from gehrd


✨ SYNOPSIS ✨

πŸ¦‹ Functions

  • CUNMHR β€” the complex one πŸ’œ
subroutine cunmhr (side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc,
    work, lwork, info)
  • DORMHR β€” the double precision one πŸ’™
subroutine dormhr (side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc,
    work, lwork, info)
  • SORMHR β€” the single precision one 🩷
subroutine sormhr (side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc,
    work, lwork, info)
  • ZUNMHR β€” the double complex one πŸ’š
subroutine zunmhr (side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc,
    work, lwork, info)

🌈 Detailed Description 🌈

this bit is literally just the section header, no cap β€” all the actual content lives down in Function Documentation, so keep scrolling bestie 🫢


πŸ’« Function Documentation πŸ’«


πŸ¦‹ cunmhr β€” aka CUNMHR

subroutine cunmhr (character side, character trans, integer m, integer n,
    integer ilo, integer ihi, complex, dimension( lda, * ) a, integer lda,
    complex, dimension( * ) tau, complex, dimension( ldc, * ) c, integer
    ldc, complex, dimension( * ) work, integer lwork, integer info)

πŸŽ€ Purpose

okay so CUNMHR overwrites the general complex M-by-N matrix C with... and here's the vibe table, look at it, it's giving options ✨

                SIDE = 'L'     SIDE = 'R'
TRANS = 'N':      Q * C          C * Q
TRANS = 'C':      Q**H * C       C * Q**H

where Q is a complex unitary matrix of order nq, with nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of IHI-ILO elementary reflectors, as returned by CGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

✨ Parameters

  • SIDE β€” SIDE is CHARACTER*1. = 'L': apply Q or Q**H from the Left; = 'R': apply Q or Q**H from the Right. pick your fighter πŸ’…
  • TRANS β€” TRANS is CHARACTER*1. = 'N': apply Q (No transpose); = 'C': apply Q**H (Conjugate transpose). note the 'C' here β€” complex routines get the conjugate, that's the whole point bestie πŸ’œ
  • M β€” M is INTEGER. The number of rows of the matrix C. M >= 0. yes the bound is real, respect it πŸ™ˆ
  • N β€” N is INTEGER. The number of columns of the matrix C. N >= 0.
  • ILO β€” ILO is INTEGER. that's it, that's the whole description, it's a shy icon πŸŽ€
  • IHI β€” IHI is INTEGER.

okay so this one is important, listen up πŸ”₯ ILO and IHI must have the same values as in the previous call of CGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi).

If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and ILO = 1 and IHI = 0, if M = 0;

if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and ILO = 1 and IHI = 0, if N = 0.

(yes the ILO = 1, IHI = 0 edge case for a zero-size thing is real, don't come for me πŸ’€)

  • A β€” A is COMPLEX array, dimension (LDA,M) if SIDE = 'L', (LDA,N) if SIDE = 'R'. The vectors which define the elementary reflectors, as returned by CGEHRD. it's the receipts from your earlier CGEHRD call, basically 🧾
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
  • TAU β€” TAU is COMPLEX array, dimension (M-1) if SIDE = 'L', (N-1) if SIDE = 'R'. TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGEHRD.
  • C β€” C is COMPLEX array, dimension (LDC,N). On entry, the M-by-N matrix C. On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. she gets rewritten, that's the whole gig πŸ’«
  • LDC β€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • WORK β€” WORK is COMPLEX array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. free real estate info, we love her πŸ‘‘
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK.

If SIDE = 'L', LWORK >= max(1,N); if SIDE = 'R', LWORK >= max(1,M).

For optimum performance LWORK >= N*NB if SIDE = 'L', and LWORK >= M*NB if SIDE = 'R', where NB is the optimal blocksize.

If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. so -1 is the "just tell me the size bestie" mode, iconic 🧚

  • INFO β€” INFO is INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

πŸ‘‘ Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 177 of file cunmhr.f.


πŸ’™ dormhr β€” aka DORMHR

subroutine dormhr (character side, character trans, integer m, integer n,
    integer ilo, integer ihi, double precision, dimension( lda, * ) a,
    integer lda, double precision, dimension( * ) tau, double precision,
    dimension( ldc, * ) c, integer ldc, double precision, dimension( * )
    work, integer lwork, integer info)

πŸŽ€ Purpose

DORMHR overwrites the general real M-by-N matrix C with... same energy, real numbers this time, here's the table 🌸

                SIDE = 'L'     SIDE = 'R'
TRANS = 'N':      Q * C          C * Q
TRANS = 'T':      Q**T * C       C * Q**T

where Q is a real orthogonal matrix of order nq, with nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of IHI-ILO elementary reflectors, as returned by DGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

✨ Parameters

  • SIDE β€” SIDE is CHARACTER*1. = 'L': apply Q or Q**T from the Left; = 'R': apply Q or Q**T from the Right.
  • TRANS β€” TRANS is CHARACTER*1. = 'N': No transpose, apply Q; = 'T': Transpose, apply Q**T. (see how it's 'T' and not 'C'? real routines don't conjugate, that's the difference, iykyk πŸ’…)
  • M β€” M is INTEGER. The number of rows of the matrix C. M >= 0.
  • N β€” N is INTEGER. The number of columns of the matrix C. N >= 0.
  • ILO β€” ILO is INTEGER.
  • IHI β€” IHI is INTEGER.

ILO and IHI must have the same values as in the previous call of DGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi).

If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and ILO = 1 and IHI = 0, if M = 0;

if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and ILO = 1 and IHI = 0, if N = 0.

  • A β€” A is DOUBLE PRECISION array, dimension (LDA,M) if SIDE = 'L', (LDA,N) if SIDE = 'R'. The vectors which define the elementary reflectors, as returned by DGEHRD.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (M-1) if SIDE = 'L', (N-1) if SIDE = 'R'. TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by DGEHRD.
  • C β€” C is DOUBLE PRECISION array, dimension (LDC,N). On entry, the M-by-N matrix C. On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
  • LDC β€” LDC is INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” LWORK is INTEGER. The dimension of the array WORK.

If SIDE = 'L', LWORK >= max(1,N); if SIDE = 'R', LWORK >= max(1,M).

For optimum performance LWORK >= N*NB if SIDE = 'L', and LWORK >= M*NB if SIDE = 'R', where NB is the optimal blocksize.

If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.

  • INFO β€” INFO is INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

πŸ‘‘ Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 176 of file dormhr.f.


🩷 sormhr β€” aka SORMHR

subroutine sormhr (character side, character trans, integer m, integer n,
    integer ilo, integer ihi, real, dimension( lda, * ) a, integer lda,
    real, dimension( * ) tau, real, dimension( ldc, * ) c, integer ldc,
    real, dimension( * ) work, integer lwork, integer info)

πŸŽ€ Purpose

SORMHR overwrites the general real M-by-N matrix C with... yep, the single-precision sibling, same table, same slay πŸ’–

                SIDE = 'L'     SIDE = 'R'
TRANS = 'N':      Q * C          C * Q
TRANS = 'T':      Q**T * C       C * Q**T

where Q is a real orthogonal matrix of order nq, with nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of IHI-ILO elementary reflectors, as returned by SGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

✨ Parameters

  • SIDE β€” SIDE is CHARACTER*1. = 'L': apply Q or Q**T from the Left; = 'R': apply Q or Q**T from the Right.
  • TRANS β€” TRANS is CHARACTER*1. = 'N': No transpose, apply Q; = 'T': Transpose, apply Q**T.
  • M β€” M is INTEGER. The number of rows of the matrix C. M >= 0.
bestie the page literally cuts off right as we hit N β€” part 2 has the rest of SORMHR and the whole ZUNMHR section, don't go anywhere 🫢

N is INTEGER β€” the number of columns of the matrix C. N >= 0. ✨ No negative column counts allowed, bestie, we don't do that here.

  • ILO β€” is INTEGER.
  • IHI β€” is INTEGER. ILO and IHI must have the same values as in the previous call of SGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and ILO = 1 and IHI = 0, if M = 0; if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and ILO = 1 and IHI = 0, if N = 0. πŸ‘‘
  • A β€” REAL array. Dimensions:
(LDA,M) if SIDE = 'L'
(LDA,N) if SIDE = 'R'

These are the vectors which define the elementary reflectors, as returned by SGEHRD. πŸ¦‹

  • LDA β€” INTEGER, the leading dimension of the array A. LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
  • TAU β€” REAL array, dimension (M-1) if SIDE = 'L', (N-1) if SIDE = 'R'. TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEHRD.
  • C β€” REAL array, dimension (LDC,N). On entry, the M-by-N matrix C. On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. πŸ’…
  • LDC β€” INTEGER, the leading dimension of the array C. LDC >= max(1,M).
  • WORK β€” REAL array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” INTEGER, the dimension of the array WORK. If SIDE = 'L', LWORK >= max(1,N); if SIDE = 'R', LWORK >= max(1,M). For optimum performance LWORK >= N*NB if SIDE = 'L', and LWORK >= M*NB if SIDE = 'R', where NB is the optimal blocksize. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. ⚑
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

🌸 Author 🌸

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 177 of file sormhr.f.


πŸ’œ subroutine zunmhr πŸ’œ

subroutine zunmhr (character side, character trans, integer m, integer n,
    integer ilo, integer ihi, complex*16, dimension( lda, * ) a, integer
    lda, complex*16, dimension( * ) tau, complex*16, dimension( ldc, * ) c,
    integer ldc, complex*16, dimension( * ) work, integer lwork, integer
    info)

πŸ¦‹ Purpose πŸ¦‹

ZUNMHR overwrites the general complex M-by-N matrix C with:

                SIDE = 'L'     SIDE = 'R'
TRANS = 'N':      Q * C          C * Q
TRANS = 'C':      Q**H * C       C * Q**H

where Q is a complex unitary matrix of order nq, with nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of IHI-ILO elementary reflectors, as returned by ZGEHRD:

Q = H(ilo) H(ilo+1) . . . H(ihi-1).

✨ Parameters ✨

  • SIDE β€” CHARACTER*1. = 'L': apply Q or Q**H from the Left; = 'R': apply Q or Q**H from the Right. πŸ’–
  • TRANS β€” CHARACTER*1. = 'N': apply Q (No transpose); = 'C': apply Q**H (Conjugate transpose).
  • M β€” INTEGER. The number of rows of the matrix C. M >= 0.
  • N β€” INTEGER. The number of columns of the matrix C. N >= 0. (Yes, same energy as before, bestie. πŸ’…)
  • ILO β€” is INTEGER.
  • IHI β€” is INTEGER. ILO and IHI must have the same values as in the previous call of ZGEHRD. Q is equal to the unit matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and ILO = 1 and IHI = 0, if M = 0; if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and ILO = 1 and IHI = 0, if N = 0. πŸ‘‘
  • A β€” COMPLEX*16 array. Dimensions:
(LDA,M) if SIDE = 'L'
(LDA,N) if SIDE = 'R'

The vectors which define the elementary reflectors, as returned by ZGEHRD. πŸ¦‹

  • LDA β€” INTEGER, the leading dimension of the array A. LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
  • TAU β€” COMPLEX*16 array, dimension (M-1) if SIDE = 'L', (N-1) if SIDE = 'R'. TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGEHRD.
  • C β€” COMPLEX*16 array, dimension (LDC,N). On entry, the M-by-N matrix C. On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. πŸ’…
  • LDC β€” INTEGER, the leading dimension of the array C. LDC >= max(1,M).
  • WORK β€” COMPLEX*16 array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” INTEGER, the dimension of the array WORK. If SIDE = 'L', LWORK >= max(1,N); if SIDE = 'R', LWORK >= max(1,M). For optimum performance LWORK >= N*NB if SIDE = 'L', and LWORK >= M*NB if SIDE = 'R', where NB is the optimal blocksize. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. ⚑
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

πŸŽ€ Author πŸŽ€

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 176 of file zunmhr.f.


🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code.

✨ And that's the whole glow-up, bestie β€” LAPACK, Version 3.12.0, unmhr(3). You ate that. πŸ’‹πŸ’–

πŸ“¦ where this page comes from