fsml_sort Interface

public interface fsml_sort

Sort real array in ascending (mode=1) or descending (mode=2) order. Preserves the input array. Outputs sorted array and index mapping.

Calls

interface~~fsml_sort~~CallsGraph interface~fsml_sort fsml_sort proc~s_dat_rank s_dat_rank interface~fsml_sort->proc~s_dat_rank

Module Procedures

public pure subroutine s_dat_rank(x, ranks)

Ranks all samples such that the smallest value obtains rank 1 and the largest rank n. Handles tied ranks and assigns average rank to tied elements within one group of tied elements.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x(:)

x array

real(kind=wp), intent(out), allocatable :: ranks(:)

ranks of x