0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_orderpack::rnkpar Interface Reference

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)
 

Detailed Description

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.

Parameters
[in]integer(i4)/real(sp,dp), dimension(:) :: XVALTArray to be ranked.
[in]integer(i4) :: NORDNumber of ranked elements.
Return values
integer(i4), dimension(:) :: IRNGTIndex of rank.

Definition at line 594 of file mo_orderpack.f90.

Member Function/Subroutine Documentation

◆ d_rnkpar()

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.

◆ i_rnkpar()

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.

◆ r_rnkpar()

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.


The documentation for this interface was generated from the following file: