SRC/clapmr.f(3)

πŸ’… SRC/clapmr.f β€” from the Library Functions Manual πŸŽ€

okay bestie, settle in, because this one is a Fortran subroutine page and honestly? she's iconic. it's SRC/clapmr.f, and it does exactly one thing but does it so well. ✨


✨ NAME ✨

SRC/clapmr.f β€” the file where clapmr lives, and the whole page is basically her whole personality.


🌸 SYNOPSIS 🌸

Functions/Subroutines

subroutine clapmr (forwrd, m, n, x, ldx, k)

CLAPMR rearranges rows of a matrix as specified by a permutation vector. that's it. that's the tweet. 🐦


πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine clapmr (logical forwrd, integer m, integer n, complex, dimension(
    ldx, * ) x, integer ldx, integer, dimension( * ) k)

CLAPMR rearranges rows of a matrix as specified by a permutation vector. no cap, that is genuinely her entire job description.

🎯 Purpose:

!>
!> CLAPMR rearranges the rows of the M by N matrix X as specified
!> by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
!> If FORWRD = .TRUE.,  forward permutation:
!>
!>      X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
!>
!> If FORWRD = .FALSE., backward permutation:
!>
!>      X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
!>

so like β€” if FORWRD = .TRUE., it's a forward permutation, and X(K(I),*) is moved X(I,*) for I = 1,2,...,M.

and if FORWRD = .FALSE., it's a backward permutation, and X(I,*) is moved to X(K(I),*) for I = 1,2,...,M. she's reversible, she's flexible, she contains multitudes πŸ’–


πŸ‘‘ Parameters πŸ‘‘

FORWRD

!>          FORWRD is LOGICAL
!>          = .TRUE., forward permutation
!>          = .FALSE., backward permutation
!>

the vibe check switch: .TRUE. means forward permutation, .FALSE. means backward permutation. pick your fighter βš”οΈ

M

!>          M is INTEGER
!>          The number of rows of the matrix X. M >= 0.
!>

the number of rows of the matrix X, and the constraint is literally M >= 0. zero is allowed, bestie, we don't gatekeep 🫢

N

!>          N is INTEGER
!>          The number of columns of the matrix X. N >= 0.
!>

the number of columns of the matrix X, and again N >= 0. same energy, same allowance ✨

X

!>          X is COMPLEX array, dimension (LDX,N)
!>          On entry, the M by N matrix X.
!>          On exit, X contains the permuted matrix X.
!>

X is a COMPLEX array with dimension (LDX,N). on entry she's the M by N matrix X; on exit she's the permuted matrix X. glow-up was internal, results are external πŸ’…

LDX

!>          LDX is INTEGER
!>          The leading dimension of the array X, LDX >= MAX(1,M).
!>

LDX is INTEGER, the leading dimension of the array X, and the rule is LDX >= MAX(1,M). read it and weep, but like, affectionately 😭

K

!>          K is INTEGER array, dimension (M)
!>          On entry, K contains the permutation vector. K is used as
!>          internal workspace, but reset to its original value on
!>          output.
!>

K is an INTEGER array with dimension (M). on entry, K contains the permutation vector. lowkey the wild part: K gets used as internal workspace, but it's reset to its original value on output. she borrows your car, fills the tank, hands back the keys. main character energy fr fr πŸ”₯


🌈 Author 🌈

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

Definition at line 103 of file clapmr.f. yes, we're citing our sources, academic integrity is also slay πŸ“š


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for LAPACK from the source code. not a human, just a very diligent little robot doing her best 🧚


ok gorl that's the whole page, no cliffhangers, every flag and caveat accounted for πŸ’€

so yeah β€” that's SRC/clapmr.f from LAPACK, Version 3.12.0, dated SRC/clapmr.f(3) at the bottom of the original. go rearrange some rows, you absolute legend, and remember: LDX >= MAX(1,M) or it's on sight πŸ“πŸ’–

πŸ“¦ where this page comes from