SRC/slasrt.f(3)
β¨ SRC/slasrt.f β¨
okay so bestie, this is a manpage from Library Functions Manual β yes, the actual manual, and the star of the show is SRC/slasrt.f π
don't worry, we're gonna get through it together.
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine slasrt (id, n, d, info)β SLASRT sorts numbers in increasing or decreasing order. that's the whole gig π
π¦ Function/Subroutine Documentation π¦
subroutine slasrt (character id, integer n, real, dimension( * ) d, integer info)
SLASRT sorts numbers in increasing or decreasing order. iconic behavior, honestly π
πΈ Purpose πΈ
!>
!> Sort the numbers in D in increasing order (if ID = 'I') or
!> in decreasing order (if ID = 'D' ).
!>
!> Use Quick Sort, reverting to Insertion sort on arrays of
!> size <= 20. Dimension of STACK limits N to about 2**32.
!>
so it's giving algorithm royalty β Quick Sort is the main character, but the moment your array is <= 20 elements it switches to Insertion sort like "nah this small one's easy" π§ and heads up, the dimension of STACK caps N at about 2**32. not me doing math, that's just what the page says fr fr.
π Parameters π
ID
!> ID is CHARACTER*1
!> = 'I': sort D in increasing order;
!> = 'D': sort D in decreasing order.
!>
literally the vibe selector. 'I' = increasing, 'D' = decreasing, no in-between π
N
!> N is INTEGER
!> The length of the array D.
!>
how many numbers we're dealing with. that's it, that's the whole thing.
D
!> D is REAL array, dimension (N)
!> On entry, the array to be sorted.
!> On exit, D has been sorted into increasing order
!> (D(1) <= ... <= D(N) ) or into decreasing order
!> (D(1) >= ... >= D(N) ), depending on ID.
!>
the actual array, the whole reason we're here π«Ά it goes in unsorted, it comes out sorted β which way depends on ID, and those D(1) <= ... <= D(N) / D(1) >= ... >= D(N) conditions are the receipts.
INFO
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
0 means slay, we're done β¨ and < 0 means somebody messed up β specifically if INFO = -i, then the i-th argument had an illegal value. read the number, go fix that argument, periodt.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 87 of file slasrt.f. lowkey iconic that we know exactly where it lives π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. the robots wrote this one, not me π
okay that's the whole page bestie, no cap, nothing skipped π
LAPACK Β· Version 3.12.0 Β· SRC/slasrt.f(3) β mwah, go sort something πβ¨
π¦ 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