You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often when I sort data, what I really want are the N largest values. I think a function
function maxloc_n(x,n) result(imax)
real, intent(in) :: x(:)
integer, intent(in) :: n
integer :: imax(n) ! positions of n largest values of x(:)
end function maxloc_n
would be widely used if implemented.
The text was updated successfully, but these errors were encountered:
I have not checked it, but my guess is that the ORDERPACK library contains
such routines - http://www.fortran-2000.com/rank/
Op do 8 apr. 2021 om 04:41 schreef Beliavsky ***@***.***>:
Often when I sort data, what I really want are the N largest values. I
think a function
function maxloc_n(x,n) result(imax)
real, intent(in) :: x(:)
integer, intent(in) :: n
integer :: imax(n) ! positions of n largest values of x(:)
end function maxloc_n
would be widely used if implemented.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#378>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YR2HCOWRNGTB6B6M6DDTHUJXNANCNFSM42R57UKA>
.
I have not checked it, but my guess is that the ORDERPACK library contains such routines - http://www.fortran-2000.com/rank/ Op do 8 apr. 2021 om 04:41 schreef Beliavsky @.***>:
Yep. ORDERPACK does that and much more (I use it from time to time).
Does the existence of "partial ranking" in ORDERPACK mean that it should not be stdlib, because it is already available, or that it should be in stdlib, because it is something commonly needed and an implementation is available? This is a general question I have about stdlib. When some algorithm can be implemented in Fortran, when should it be in stdlib and ultimately in the Fortran standard, as opposed to being available to Fortranners who want it, perhaps via FPM?
Often when I sort data, what I really want are the N largest values. I think a function
would be widely used if implemented.
The text was updated successfully, but these errors were encountered: