|
◆ normalizeddensityindex()
subroutine, public simple_stat::normalizeddensityindex |
( |
real, dimension(:), intent(in) |
rnum, |
|
|
real, dimension(:), intent(in) |
perc_vals, |
|
|
real, dimension(:), intent(out) |
ndi, |
|
|
real, dimension(:), intent(out) |
nlimbins |
|
) |
| |
Compute Normalized Density Index.
- Parametri
-
[in] | rnum | data to analize |
[in] | perc_vals | the percentiles values to be computed, between 0. and 100. |
[out] | ndi | normalized density index |
[out] | nlimbins | the extreme values of data taken in account for ndi computation |
Definizione alla linea 1335 del file simple_stat.f90.
1337 REAL, DIMENSION(:), INTENT(IN) :: rnum
1338 REAL, DIMENSION(:), INTENT(IN) :: perc_vals
1339 REAL, DIMENSION(:), INTENT(OUT) :: ndi
1340 REAL, DIMENSION(:), INTENT(OUT) :: nlimbins
1342 REAL, DIMENSION(size(ndi)) :: di
1343 INTEGER, DIMENSION(size(ndi)) :: occu
1344 REAL, DIMENSION(size(nlimbins)) :: limbins
1346 integer :: i,k,middle
1349 limbins = stat_percentile(rnum,perc_vals)
1351 call densityindex(di,nlimbins,occu,rnum,limbins)
1355 middle=count(c_e(rnum))/2
1357 do i=1,count(c_e(occu))
1359 if (k > middle) then
1360 if (k > 1 .and. (k - occu(i)) == middle) then
1361 med = (di(i-1) + di(i)) / 2.
1370 ndi(:count(c_e(di))) = min(pack(di,mask=c_e(di))/med,1.0)
|