FORCES
FORtran lib for Comp. Env. Sys.
|
Insertion sort ranking (unoptimized). More...
Public Member Functions | |
subroutine | d_rinpar (xdont, irngt, nord) |
subroutine | r_rinpar (xdont, irngt, nord) |
subroutine | i_rinpar (xdont, irngt, nord) |
Insertion sort ranking (unoptimized).
Ranks partially XVALT by IRNGT, up to order NORD This version is not optimized for performance, and is thus not as difficult to read as some other ones. It uses insertion sort, limiting insertion to the first NORD values. It does not use any work array and is faster when NORD is very small (2-5), but worst case behavior (intially inverse sorted) can easily happen. In many cases, refined quicksort method is faster.
[in] | integer(i4)/real(sp,dp), dimension(:) :: XVALT | Array to be ranked. |
[in] | integer(i4) :: NORD | Number of ranked elements. |
integer(i4), dimension(:) :: IRNGT | Index of rank. |
Definition at line 572 of file mo_orderpack.f90.
subroutine mo_orderpack::rinpar::d_rinpar | ( | real(kind = dp), dimension (:), intent(in) | xdont, |
integer(kind = i4), dimension (:), intent(out) | irngt, | ||
integer(kind = i4), intent(in) | nord | ||
) |
Definition at line 9254 of file mo_orderpack.f90.
subroutine mo_orderpack::rinpar::i_rinpar | ( | integer(kind = i4), dimension (:), intent(in) | xdont, |
integer(kind = i4), dimension (:), intent(out) | irngt, | ||
integer(kind = i4), intent(in) | nord | ||
) |
Definition at line 9344 of file mo_orderpack.f90.
subroutine mo_orderpack::rinpar::r_rinpar | ( | real(kind = sp), dimension (:), intent(in) | xdont, |
integer(kind = i4), dimension (:), intent(out) | irngt, | ||
integer(kind = i4), intent(in) | nord | ||
) |
Definition at line 9299 of file mo_orderpack.f90.