DLASRT2(l)
β¨ NAME β¨
okay bestie, meet DLASRT2(l) β the LAPACK routine (version 1.5) that sorts the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D'). π
β¨
πΈ SYNOPSIS πΈ
SUBROUTINE DLASRT2( ID, N, D, KEY, INFO )
CHARACTER ID
INTEGER INFO, N
INTEGER KEY( * )
DOUBLE PRECISION D( * )
π PURPOSE π
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D'). No cap, she's got this. β¨
She uses Quick Sort, but reverts to Insertion sort on arrays of size <= 20. The dimension of STACK limits N to about 2**32. π
π ARGUMENTS π
IDβ (input)CHARACTER*1= 'I': sortDin increasing order;= 'D': sortDin decreasing order.
Nβ (input)INTEGERThe length of the arrayD.Dβ (input/output)DOUBLE PRECISION array, dimension(N)On entry, the array to be sorted. On exit,Dhas been sorted into increasing order (D(1) <= ... <= D(N)) or into decreasing order (D(1) >= ... >= D(N)), depending onID.KEYβ (input/output)INTEGER array, dimension(N)On entry,KEYcontains a key to each of the entries inD(). Typically,KEY(I) = Ifor allI. On exit,KEYis permuted in exactly the same manner asD()was permuted from input to output. Therefore, ifKEY(I) = Ifor allIupon input, thenD_out(I) = D_in(KEY(I)).INFOβ (output)INTEGER= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value
LAPACK version 1.5 Β· 12 May 1997 Β· mwah π slay, bestie π«Ά
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms