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

Nth index of skewed-pivot with quicksort ranking. More...

Public Member Functions

integer(kind=i4) function d_indnth (xdont, nord)
 
integer(kind=i4) function r_indnth (xdont, nord)
 
integer(kind=i4) function i_indnth (xdont, nord)
 

Detailed Description

Nth index of skewed-pivot with quicksort ranking.

Returns the index of the NORDth value of XVALT (in increasing order). 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 takes out the original index of the maximum value in this set.

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

Definition at line 412 of file mo_orderpack.f90.

Member Function/Subroutine Documentation

◆ d_indnth()

integer(kind = i4) function mo_orderpack::indnth::d_indnth ( real(kind = dp), dimension (:), intent(in)  xdont,
integer(kind = i4), intent(in)  nord 
)

Definition at line 2223 of file mo_orderpack.f90.

◆ i_indnth()

integer(kind = i4) function mo_orderpack::indnth::i_indnth ( integer(kind = i4), dimension (:), intent(in)  xdont,
integer(kind = i4), intent(in)  nord 
)

Definition at line 3235 of file mo_orderpack.f90.

◆ r_indnth()

integer(kind = i4) function mo_orderpack::indnth::r_indnth ( real(kind = sp), dimension (:), intent(in)  xdont,
integer(kind = i4), intent(in)  nord 
)

Definition at line 2729 of file mo_orderpack.f90.


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