FORCES
FORtran lib for Comp. Env. Sys.
|
Skewed-pivot with quicksort ranking. More...
Public Member Functions | |
subroutine | d_rnkpar (xdont, irngt, nord) |
subroutine | r_rnkpar (xdont, irngt, nord) |
subroutine | i_rnkpar (xdont, irngt, nord) |
Skewed-pivot with quicksort ranking.
Ranks partially XVALT by IRNGT, up to order NORD (refined for speed). This routine uses a pivoting strategy such as the one of finding the median based on the quicksort algorithm, but we skew the pivot choice to try to bring it to NORD as fast as possible. It uses 2 temporary arrays, one where it stores the indices of the values smaller than the pivot, and the other for the indices of values larger than the pivot that we might still need later on. It iterates until it can bring the number of values in ILOWT to exactly NORD, and then uses an insertion sort to rank this set, since it is supposedly small.
[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 594 of file mo_orderpack.f90.
subroutine mo_orderpack::rnkpar::d_rnkpar | ( | real(kind = dp), dimension (:), intent(in) | xdont, |
integer(kind = i4), dimension (:), intent(out) | irngt, | ||
integer(kind = i4), intent(in) | nord | ||
) |
Definition at line 9389 of file mo_orderpack.f90.
subroutine mo_orderpack::rnkpar::i_rnkpar | ( | integer(kind = i4), dimension (:), intent(in) | xdont, |
integer(kind = i4), dimension (:), intent(out) | irngt, | ||
integer(kind = i4), intent(in) | nord | ||
) |
Definition at line 10429 of file mo_orderpack.f90.
subroutine mo_orderpack::rnkpar::r_rnkpar | ( | real(kind = sp), dimension (:), intent(in) | xdont, |
integer(kind = i4), dimension (:), intent(out) | irngt, | ||
integer(kind = i4), intent(in) | nord | ||
) |
Definition at line 9909 of file mo_orderpack.f90.