ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_sampleECDF.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
66
67!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68
70
71 use pm_kind, only: SK, IK, LK
72
73 implicit none
74
75 character(*, SK), parameter :: MODULE_NAME = "@pm_sampleECDF"
76
77!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
78
151 interface setECDF
152
153 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156
157 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
158
159#if RK5_ENABLED
160 PURE module subroutine setECDF_ONE_D1_RK5(ecdf, lcdf, ucdf, alpha)
161#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
162 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_ONE_D1_RK5
163#endif
164 use pm_kind, only: TKG => RK5
165 real(TKG) , intent(out) , contiguous :: ecdf(:)
166 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
167 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
168 real(TKG) , intent(in) , optional :: alpha
169 end subroutine
170#endif
171
172#if RK4_ENABLED
173 PURE module subroutine setECDF_ONE_D1_RK4(ecdf, lcdf, ucdf, alpha)
174#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
175 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_ONE_D1_RK4
176#endif
177 use pm_kind, only: TKG => RK4
178 real(TKG) , intent(out) , contiguous :: ecdf(:)
179 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
180 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
181 real(TKG) , intent(in) , optional :: alpha
182 end subroutine
183#endif
184
185#if RK3_ENABLED
186 PURE module subroutine setECDF_ONE_D1_RK3(ecdf, lcdf, ucdf, alpha)
187#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
188 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_ONE_D1_RK3
189#endif
190 use pm_kind, only: TKG => RK3
191 real(TKG) , intent(out) , contiguous :: ecdf(:)
192 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
193 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
194 real(TKG) , intent(in) , optional :: alpha
195 end subroutine
196#endif
197
198#if RK2_ENABLED
199 PURE module subroutine setECDF_ONE_D1_RK2(ecdf, lcdf, ucdf, alpha)
200#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
201 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_ONE_D1_RK2
202#endif
203 use pm_kind, only: TKG => RK2
204 real(TKG) , intent(out) , contiguous :: ecdf(:)
205 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
206 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
207 real(TKG) , intent(in) , optional :: alpha
208 end subroutine
209#endif
210
211#if RK1_ENABLED
212 PURE module subroutine setECDF_ONE_D1_RK1(ecdf, lcdf, ucdf, alpha)
213#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
214 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_ONE_D1_RK1
215#endif
216 use pm_kind, only: TKG => RK1
217 real(TKG) , intent(out) , contiguous :: ecdf(:)
218 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
219 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
220 real(TKG) , intent(in) , optional :: alpha
221 end subroutine
222#endif
223
224 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
225
226#if RK5_ENABLED
227 PURE module subroutine setECDF_WIK_D1_RK5(ecdf, weight, weisum, lcdf, ucdf, alpha)
228#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
229 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WIK_D1_RK5
230#endif
231 use pm_kind, only: TKG => RK5
232 integer(IK) , intent(in) :: weisum
233 integer(IK) , intent(in) , contiguous :: weight(:)
234 real(TKG) , intent(out) , contiguous :: ecdf(:)
235 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
236 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
237 real(TKG) , intent(in) , optional :: alpha
238 end subroutine
239#endif
240
241#if RK4_ENABLED
242 PURE module subroutine setECDF_WIK_D1_RK4(ecdf, weight, weisum, lcdf, ucdf, alpha)
243#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
244 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WIK_D1_RK4
245#endif
246 use pm_kind, only: TKG => RK4
247 integer(IK) , intent(in) :: weisum
248 integer(IK) , intent(in) , contiguous :: weight(:)
249 real(TKG) , intent(out) , contiguous :: ecdf(:)
250 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
251 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
252 real(TKG) , intent(in) , optional :: alpha
253 end subroutine
254#endif
255
256#if RK3_ENABLED
257 PURE module subroutine setECDF_WIK_D1_RK3(ecdf, weight, weisum, lcdf, ucdf, alpha)
258#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
259 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WIK_D1_RK3
260#endif
261 use pm_kind, only: TKG => RK3
262 integer(IK) , intent(in) :: weisum
263 integer(IK) , intent(in) , contiguous :: weight(:)
264 real(TKG) , intent(out) , contiguous :: ecdf(:)
265 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
266 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
267 real(TKG) , intent(in) , optional :: alpha
268 end subroutine
269#endif
270
271#if RK2_ENABLED
272 PURE module subroutine setECDF_WIK_D1_RK2(ecdf, weight, weisum, lcdf, ucdf, alpha)
273#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
274 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WIK_D1_RK2
275#endif
276 use pm_kind, only: TKG => RK2
277 integer(IK) , intent(in) :: weisum
278 integer(IK) , intent(in) , contiguous :: weight(:)
279 real(TKG) , intent(out) , contiguous :: ecdf(:)
280 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
281 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
282 real(TKG) , intent(in) , optional :: alpha
283 end subroutine
284#endif
285
286#if RK1_ENABLED
287 PURE module subroutine setECDF_WIK_D1_RK1(ecdf, weight, weisum, lcdf, ucdf, alpha)
288#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
289 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WIK_D1_RK1
290#endif
291 use pm_kind, only: TKG => RK1
292 integer(IK) , intent(in) :: weisum
293 integer(IK) , intent(in) , contiguous :: weight(:)
294 real(TKG) , intent(out) , contiguous :: ecdf(:)
295 real(TKG) , intent(out) , contiguous, optional :: ucdf(:)
296 real(TKG) , intent(out) , contiguous, optional :: lcdf(:)
297 real(TKG) , intent(in) , optional :: alpha
298 end subroutine
299#endif
300
301 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
302
303#if RK5_ENABLED
304 PURE module subroutine setECDF_WRK_D1_RK5(ecdf, weight, weisum)
305#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
306 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WRK_D1_RK5
307#endif
308 use pm_kind, only: TKG => RK5
309 real(TKG) , intent(in) :: weisum
310 real(TKG) , intent(in) , contiguous :: weight(:)
311 real(TKG) , intent(out) , contiguous :: ecdf(:)
312 end subroutine
313#endif
314
315#if RK4_ENABLED
316 PURE module subroutine setECDF_WRK_D1_RK4(ecdf, weight, weisum)
317#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
318 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WRK_D1_RK4
319#endif
320 use pm_kind, only: TKG => RK4
321 real(TKG) , intent(in) :: weisum
322 real(TKG) , intent(in) , contiguous :: weight(:)
323 real(TKG) , intent(out) , contiguous :: ecdf(:)
324 end subroutine
325#endif
326
327#if RK3_ENABLED
328 PURE module subroutine setECDF_WRK_D1_RK3(ecdf, weight, weisum)
329#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
330 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WRK_D1_RK3
331#endif
332 use pm_kind, only: TKG => RK3
333 real(TKG) , intent(in) :: weisum
334 real(TKG) , intent(in) , contiguous :: weight(:)
335 real(TKG) , intent(out) , contiguous :: ecdf(:)
336 end subroutine
337#endif
338
339#if RK2_ENABLED
340 PURE module subroutine setECDF_WRK_D1_RK2(ecdf, weight, weisum)
341#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
342 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WRK_D1_RK2
343#endif
344 use pm_kind, only: TKG => RK2
345 real(TKG) , intent(in) :: weisum
346 real(TKG) , intent(in) , contiguous :: weight(:)
347 real(TKG) , intent(out) , contiguous :: ecdf(:)
348 end subroutine
349#endif
350
351#if RK1_ENABLED
352 PURE module subroutine setECDF_WRK_D1_RK1(ecdf, weight, weisum)
353#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
354 !DEC$ ATTRIBUTES DLLEXPORT :: setECDF_WRK_D1_RK1
355#endif
356 use pm_kind, only: TKG => RK1
357 real(TKG) , intent(in) :: weisum
358 real(TKG) , intent(in) , contiguous :: weight(:)
359 real(TKG) , intent(out) , contiguous :: ecdf(:)
360 end subroutine
361#endif
362
363 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
364
365 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
366 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
367 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
368
369 end interface
370
371!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
372
373end module pm_sampleECDF ! LCOV_EXCL_LINE
Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally ...
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter RK5
Definition: pm_kind.F90:478
integer, parameter RK4
Definition: pm_kind.F90:489
integer, parameter RK2
Definition: pm_kind.F90:511
integer, parameter RK3
Definition: pm_kind.F90:500
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RK1
Definition: pm_kind.F90:522
This module contains classes and procedures for computing the Empirical Cumulative Distribution Funct...
character(*, SK), parameter MODULE_NAME