FORCES
FORtran lib for Comp. Env. Sys.
|
Median index of skewed-pivot with quicksort ranking. More...
Public Member Functions | |
subroutine | d_indmed (xdont, indm) |
subroutine | r_indmed (xdont, indm) |
subroutine | i_indmed (xdont, indm) |
Median index of skewed-pivot with quicksort ranking.
Returns the index of the median (((Size(XVALT)+1))/2th value)
of XVALT This routine uses the recursive procedure described in Knuth, The Art of Computer Programming, vol. 3, 5.3.3 - This procedure is linear in time, and does not require to be able to interpolate in the set as the one used in INDNTH. It also has better worst case behavior than INDNTH, but is about 10% slower in average for random uniformly distributed values.
Note that in Orderpack 1.0, this routine was a Function procedure, and is now changed to a Subroutine.
[in] | integer(i4)/real(sp,dp), dimension(:) :: XVALT | Array to be ranked. |
[out] | integer(i4) :: INDM | Index of Median. |
Definition at line 390 of file mo_orderpack.f90.
subroutine mo_orderpack::indmed::d_indmed | ( | real(kind = dp), dimension (:), intent(in) | xdont, |
integer(kind = i4), intent(out) | indm | ||
) |
Definition at line 1029 of file mo_orderpack.f90.
subroutine mo_orderpack::indmed::i_indmed | ( | integer(kind = i4), dimension (:), intent(in) | xdont, |
integer(kind = i4), intent(out) | indm | ||
) |
Definition at line 1825 of file mo_orderpack.f90.
subroutine mo_orderpack::indmed::r_indmed | ( | real(kind = sp), dimension (:), intent(in) | xdont, |
integer(kind = i4), intent(out) | indm | ||
) |
Definition at line 1427 of file mo_orderpack.f90.