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 matrixX. It has to beM >= 0.NβN is INTEGER. The number of columns of the matrixX. It has to beN >= 0.XβX is REAL array, dimension (LDX,N). On entry, it's theMbyNmatrixX. On exit,Xcontains the permuted matrixX. Iconic behavior.LDXβLDX is INTEGER. The leading dimension of the arrayX, and it's gotta beLDX >= MAX(1,M).KβK is INTEGER array, dimension (M). On entry,Kcontains the permutation vector.Kis 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
- 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