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

Partial quicksort/insertion sort ranking, with removal of duplicate entries. More...

Public Member Functions

subroutine d_unipar (xdont, irngt, nord)
 
subroutine r_unipar (xdont, irngt, nord)
 
subroutine i_unipar (xdont, irngt, nord)
 

Detailed Description

Partial quicksort/insertion sort ranking, with removal of duplicate entries.

Ranks partially XVALT by IRNGT, up to order NORD at most, removing duplicate entries. 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 quickly 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. At all times, the NORD first values in ILOWT correspond to distinct values of the input array.

Parameters
[in]integer(i4)/real(sp,dp), dimension(:) :: XVALTArray to be ranked.
[in]integer(i4) :: NORDRank of quicksort ranking.
[out]integer(i4), dimension(:) :: IRNGTIndex of rank.

Definition at line 638 of file mo_orderpack.f90.

Member Function/Subroutine Documentation

◆ d_unipar()

subroutine mo_orderpack::unipar::d_unipar ( real(kind = dp), dimension (:), intent(in)  xdont,
integer(kind = i4), dimension (:), intent(out)  irngt,
integer(kind = i4), intent(inout)  nord 
)

Definition at line 11724 of file mo_orderpack.f90.

◆ i_unipar()

subroutine mo_orderpack::unipar::i_unipar ( integer(kind = i4), dimension (:), intent(in)  xdont,
integer(kind = i4), dimension (:), intent(out)  irngt,
integer(kind = i4), intent(inout)  nord 
)

Definition at line 12926 of file mo_orderpack.f90.

◆ r_unipar()

subroutine mo_orderpack::unipar::r_unipar ( real(kind = sp), dimension (:), intent(in)  xdont,
integer(kind = i4), dimension (:), intent(out)  irngt,
integer(kind = i4), intent(inout)  nord 
)

Definition at line 12325 of file mo_orderpack.f90.


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