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

Find median value of array. More...

Public Member Functions

recursive real(kind=dp) function d_valmed (xdont)
 
recursive real(kind=sp) function r_valmed (xdont)
 
recursive integer(kind=i4) function i_valmed (xdont)
 

Detailed Description

Find median value of array.

Finds out and returns 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 VALNTH/INDNTH. It also has better worst case behavior than VALNTH/INDNTH, and is about 20% faster in average for random uniformly distributed values.

Parameters
[in]integer(i4)/real(sp,dp), dimension(:) :: XVALTArray to be ranked.
Return values
integer(i4)/real(sp,dp) :: VALMEDValue of median.

Definition at line 687 of file mo_orderpack.f90.

Member Function/Subroutine Documentation

◆ d_valmed()

recursive real(kind = dp) function mo_orderpack::valmed::d_valmed ( real(kind = dp), dimension (:), intent(in)  xdont)

Definition at line 14359 of file mo_orderpack.f90.

◆ i_valmed()

recursive integer(kind = i4) function mo_orderpack::valmed::i_valmed ( integer(kind = i4), dimension (:), intent(in)  xdont)

Definition at line 15031 of file mo_orderpack.f90.

◆ r_valmed()

recursive real(kind = sp) function mo_orderpack::valmed::r_valmed ( real(kind = sp), dimension (:), intent(in)  xdont)

Definition at line 14695 of file mo_orderpack.f90.


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