SRC/slapmr.f(3)

πŸ’– NAME πŸ’–

SRC/slapmr.f β€” yep, that's the page, and it lives in the LAPACK Library Functions Manual. This one is fully about the slapmr subroutine: the row-shuffling bestie. No cap.

✨ SYNOPSIS ✨

🧚 Functions/Subroutines 🧚

subroutine slapmr (forwrd, m, n, x, ldx, k)
    SLAPMR rearranges rows of a matrix as specified by a permutation vector.

The vibe: you hand it a matrix and a permutation vector, and it does the row rearrangement thing. Slay.

🌈 Function/Subroutine Documentation 🌈

πŸŽ€ The subroutine itself πŸŽ€

subroutine slapmr (logical forwrd, integer m, integer n, real, dimension(
       ldx, * ) x, integer ldx, integer, dimension( * ) k)

SLAPMR rearranges rows of a matrix as specified by a permutation vector. β€” literally the one-liner, bestie.

πŸ”₯ Purpose πŸ”₯

Okay so the full tea: it rearranges the rows of the M by N matrix X exactly as the permutation K(1),K(2),...,K(M) of the integers 1,...,M says. Here's the exact move situation:

SLAPMR 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 forward permutation when FORWRD = .TRUE., and backward permutation when FORWRD = .FALSE.. The direction girlies are different, periodt.

πŸ“ Parameters πŸ“

  • FORWRD β€” FORWRD is LOGICAL. It's .TRUE. for a forward permutation, and .FALSE. for a backward permutation.
  • M β€” M is INTEGER. The number of rows of the matrix X. It has to be M >= 0.
  • N β€” N is INTEGER. The number of columns of the matrix X. It has to be N >= 0.
  • X β€” X is REAL array, dimension (LDX,N). On entry, it's the M by N matrix X. On exit, X contains the permuted matrix X. Iconic behavior.
  • LDX β€” LDX is INTEGER. The leading dimension of the array X, and it's gotta be LDX >= MAX(1,M).
  • 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. Bestie cleans up after herself.

πŸ‘‘ Author πŸ‘‘

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

Definition at line 103 of file slapmr.f.

πŸ’… Author πŸ’…

Generated automatically by Doxygen for LAPACK from the source code.


And that's the whole page, bestie. It's from LAPACK Version 3.12.0, and the page id is SRC/slapmr.f(3). Byeee 🫢✨

πŸ“¦ where this page comes from