ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_sampleECDF::setECDF Interface Reference

Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally weighted) sample of size size(ecdf). More...

Detailed Description

Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally weighted) sample of size size(ecdf).

Parameters
[out]ecdf: The output contiguous array of rank 1 of
  1. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
of the same size nsam as the number of observations in the target sample whose ECDF must be computed.
On output, it contains the Empirical Cumulative Distribution Function (ECDF) of the input sample.
[in]weight: The input contiguous vector of length nsam of,
  1. type integer of default kind IK, or
  2. type real of the same kind as the kind of ecdf,
containing the corresponding weights of individual nsam observations in the target sample.
(optional. default = getFilled(1, nsam).)
[in]weisum: The input scalar of the same type and kind as weight containing the quantity sum(weight).
(optional. It must be present if and only if the input argument weight is also present.)
[out]lcdf: The output contiguous array of the same type, kind, rank, and size as the output ecdf containing the lower confidence bound on the ECDF as the specified \(1 - \alpha\) probability.
(optional, if missing, it is not computed. It can be present if and only if the input argument weight is missing or is of type integer of default kind IK.)
[out]ucdf: The output contiguous array of the same type, kind, rank, and size as the output ecdf containing the upper confidence bound on the ECDF as the specified \(1 - \alpha\) probability.
(optional, if missing, it is not computed. It can be present if and only if the input argument weight is missing or is of type integer of default kind IK.)
[in]alpha: The input scalar of type real of the same kind as the kind of ecdf such that \(1 - \alpha\) represents the probability of the parent CDF being bounded by the output upper and lower confidence bounds of the output ecdf.
For example, if \(\alpha = 0.05\), then the output lcdf and ucdf confidence bounds contain the CDF of the true parent distribution of the sample with \( 95\% \) probability.
In other words,
  1. the lower bound marks the \(\alpha / 2\) probability contour.
  2. the upper bound marks the \(1 - \alpha / 2\) probability contour.
(optional, default = 0.05. It can be present if and only if the input argument weight is missing or is of type integer of default kind IK.)


Possible calling interfaces

call setECDF(ecdf(1 : nsam) , lcdf = lcdf(1 : nsam), ucdf = ucdf(1 : nsam), alpha = alpha)
call setECDF(ecdf(1 : nsam), weight(1 : nsam), lcdf = lcdf(1 : nsam), ucdf = ucdf(1 : nsam), alpha = alpha) ! integer (frequency) weight
call setECDF(ecdf(1 : nsam), weight(1 : nsam)) ! real (reliability) weight
!
Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally ...
This module contains classes and procedures for computing the Empirical Cumulative Distribution Funct...
Warning
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
See also
getCumSum
setCumSum
getCumPropExp
setCumPropExp


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_kind, only: IKG => IKS ! all processor kinds are supported.
5 use pm_sampleECDF, only: setECDF
6 use pm_arrayRange, only: getRange
9 use pm_distUnif, only: getUnifRand
10 use pm_arraySort, only: setSorted
11 use pm_io, only: display_type
12
13 implicit none
14
15 type(display_type) :: disp
16 integer(IK) :: itry, ntry = 10
17 disp = display_type(file = "main.out.F90")
18
19 block
20 use pm_kind, only: RKG => RKS ! all processor kinds are supported.
21 real(RKG), allocatable :: ecdf(:), lcdf(:), ucdf(:)
22 integer(IK), allocatable :: iweight(:)
23 real(RKG), allocatable :: rweight(:)
24 do itry = 1, ntry
25 call disp%show("call setResized(ecdf, getUnifRand(1_IK, 10_IK))")
26 call setResized(ecdf, getUnifRand(1_IK, 10_IK))
27 call disp%show("call setResized(lcdf, size(ecdf, 1, IK))")
28 call setResized(lcdf, size(ecdf, 1, IK))
29 call disp%show("call setResized(ucdf, size(ecdf, 1, IK))")
30 call setResized(ucdf, size(ecdf, 1, IK))
31 call disp%show("call setECDF(ecdf, lcdf, ucdf)")
32 call setECDF(ecdf, lcdf, ucdf)
33 call disp%show("lcdf")
34 call disp%show( lcdf )
35 call disp%show("ecdf")
36 call disp%show( ecdf )
37 call disp%show("ucdf")
38 call disp%show( ucdf )
39 call disp%show("call setECDF(ecdf)")
40 call setECDF(ecdf)
41 call disp%show("ecdf")
42 call disp%show( ecdf )
43 call disp%skip()
44 call disp%show("iweight = getUnifRand(1, 10, size(ecdf, 1, IK))")
45 iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
46 call disp%show("iweight")
47 call disp%show( iweight )
48 call disp%show("call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)")
49 call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
50 call disp%show("lcdf")
51 call disp%show( lcdf )
52 call disp%show("ecdf")
53 call disp%show( ecdf )
54 call disp%show("ucdf")
55 call disp%show( ucdf )
56 call disp%skip()
57 call disp%show("rweight = iweight")
58 rweight = iweight
59 call disp%show("rweight")
60 call disp%show( rweight )
61 call disp%show("call setECDF(ecdf, rweight, sum(rweight))")
62 call setECDF(ecdf, rweight, sum(rweight))
63 call disp%show("ecdf")
64 call disp%show( ecdf )
65 call disp%skip()
66 end do
67 end block
68
69 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 ! Compute the ecdf for varying sizes of a Normal sample.
71 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
73 block
74 use pm_val2str, only: getStr
75 use pm_kind, only: RKG => RKS
76 use pm_distNorm, only: setNormRand
77 character(:, SK), allocatable :: fileName
78 real(RKG), allocatable :: sample(:), ecdf(:), lcdf(:), ucdf(:)
79 integer(IK) :: i, isam, nsam
80 integer(IK) :: fileUnit
81 do i = 1, 4
82 nsam = 10 ** i
83 call setResized(lcdf, nsam)
84 call setResized(ecdf, nsam)
85 call setResized(ucdf, nsam)
86 call setResized(sample, nsam)
87 call setNormRand(sample)
88 call setSorted(sample)
89 call setECDF(ecdf, lcdf, ucdf, alpha = 0.98_RKG)
90 fileName = "main.norm." // getStr(nsam) // ".out"
91 open(newunit = fileUnit, file = fileName, status = "replace")
92 write(fileUnit, "(*(g0,:,','))") "sample,ecdf,lcdf,ucdf"
93 do isam = 1, nsam
94 write(fileUnit,"(*(g0,:,','))") sample(isam), ecdf(isam), lcdf(isam), ucdf(isam)
95 end do
96 close(fileUnit)
97 end do
98 end block
99
100end program example
Generate minimally-spaced character, integer, real sequences or sequences at fixed intervals of size ...
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Perform an unbiased random shuffling of the input array, known as the Knuth or Fisher-Yates shuffle,...
Sort the input scalar string or contiguous vector in ascending order, or return the sorted indices of...
Return a scalar or array of arbitrary rank of random values from the standard univariate Normal distr...
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
Generate and return the conversion of the input value to an output Fortran string,...
Definition: pm_val2str.F90:167
This module contains procedures and generic interfaces for generating ranges of discrete character,...
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains procedures and generic interfaces for shuffling arrays of various types.
This module contains procedures and generic interfaces for various sorting tasks.
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IKS
The single-precision integer kind in Fortran mode. On most platforms, this is a 32-bit integer kind.
Definition: pm_kind.F90:563
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 RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
This module contains the generic procedures for converting values of different types and kinds to For...
Definition: pm_val2str.F90:58
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1call setResized(ecdf, getUnifRand(1_IK, 10_IK))
2call setResized(lcdf, size(ecdf, 1, IK))
3call setResized(ucdf, size(ecdf, 1, IK))
4call setECDF(ecdf, lcdf, ucdf)
5lcdf
6+0.00000000, +0.00000000, +0.709492564E-1, +0.320949256
7ecdf
8+0.250000000, +0.500000000, +0.750000000, +1.00000000
9ucdf
10+0.929050744, +1.00000000, +1.00000000, +1.00000000
11call setECDF(ecdf)
12ecdf
13+0.250000000, +0.500000000, +0.750000000, +1.00000000
14
15iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
16iweight
17+1, +3, +9, +4
18call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
19lcdf
20+0.00000000, +0.00000000, +0.435317904, +0.670611978
21ecdf
22+0.588235296E-1, +0.235294119, +0.764705896, +1.00000000
23ucdf
24+0.388211519, +0.564682126, +1.00000000, +1.00000000
25
26rweight = iweight
27rweight
28+1.00000000, +3.00000000, +9.00000000, +4.00000000
29call setECDF(ecdf, rweight, sum(rweight))
30ecdf
31+0.588235296E-1, +0.235294119, +0.764705896, +1.00000000
32
33call setResized(ecdf, getUnifRand(1_IK, 10_IK))
34call setResized(lcdf, size(ecdf, 1, IK))
35call setResized(ucdf, size(ecdf, 1, IK))
36call setECDF(ecdf, lcdf, ucdf)
37lcdf
38+0.00000000, +0.00000000, +0.00000000, +0.581144691E-1, +0.200971603, +0.343828738, +0.486685872
39ecdf
40+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
41ucdf
42+0.656171262, +0.799028397, +0.941885591, +1.00000000, +1.00000000, +1.00000000, +1.00000000
43call setECDF(ecdf)
44ecdf
45+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
46
47iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
48iweight
49+5, +3, +9, +5, +1, +3, +5
50call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
51lcdf
52+0.00000000, +0.141422749E-1, +0.304464817, +0.465755105, +0.498013139, +0.594787359, +0.756077766
53ecdf
54+0.161290318, +0.258064508, +0.548387051, +0.709677339, +0.741935372, +0.838709593, +1.00000000
55ucdf
56+0.405212551, +0.501986742, +0.792309284, +0.953599572, +0.985857606, +1.00000000, +1.00000000
57
58rweight = iweight
59rweight
60+5.00000000, +3.00000000, +9.00000000, +5.00000000, +1.00000000, +3.00000000, +5.00000000
61call setECDF(ecdf, rweight, sum(rweight))
62ecdf
63+0.161290318, +0.258064508, +0.548387051, +0.709677339, +0.741935372, +0.838709593, +1.00000000
64
65call setResized(ecdf, getUnifRand(1_IK, 10_IK))
66call setResized(lcdf, size(ecdf, 1, IK))
67call setResized(ucdf, size(ecdf, 1, IK))
68call setECDF(ecdf, lcdf, ucdf)
69lcdf
70+0.00000000, +0.00000000, +0.709492564E-1, +0.320949256
71ecdf
72+0.250000000, +0.500000000, +0.750000000, +1.00000000
73ucdf
74+0.929050744, +1.00000000, +1.00000000, +1.00000000
75call setECDF(ecdf)
76ecdf
77+0.250000000, +0.500000000, +0.750000000, +1.00000000
78
79iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
80iweight
81+5, +4, +3, +10
82call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
83lcdf
84+0.00000000, +0.119542718, +0.255906343, +0.710451782
85ecdf
86+0.227272734, +0.409090936, +0.545454562, +1.00000000
87ucdf
88+0.516820967, +0.698639154, +0.835002780, +1.00000000
89
90rweight = iweight
91rweight
92+5.00000000, +4.00000000, +3.00000000, +10.0000000
93call setECDF(ecdf, rweight, sum(rweight))
94ecdf
95+0.227272734, +0.409090936, +0.545454562, +1.00000000
96
97call setResized(ecdf, getUnifRand(1_IK, 10_IK))
98call setResized(lcdf, size(ecdf, 1, IK))
99call setResized(ucdf, size(ecdf, 1, IK))
100call setECDF(ecdf, lcdf, ucdf)
101lcdf
102+0.00000000, +0.00000000, +0.00000000, +0.581144691E-1, +0.200971603, +0.343828738, +0.486685872
103ecdf
104+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
105ucdf
106+0.656171262, +0.799028397, +0.941885591, +1.00000000, +1.00000000, +1.00000000, +1.00000000
107call setECDF(ecdf)
108ecdf
109+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
110
111iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
112iweight
113+5, +3, +4, +9, +10, +9, +5
114call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
115lcdf
116+0.00000000, +0.00000000, +0.642128587E-1, +0.264212877, +0.486435086, +0.686435103, +0.797546148
117ecdf
118+0.111111112, +0.177777782, +0.266666681, +0.466666698, +0.688888907, +0.888888896, +1.00000000
119ucdf
120+0.313564926, +0.380231619, +0.469120502, +0.669120550, +0.891342759, +1.00000000, +1.00000000
121
122rweight = iweight
123rweight
124+5.00000000, +3.00000000, +4.00000000, +9.00000000, +10.0000000, +9.00000000, +5.00000000
125call setECDF(ecdf, rweight, sum(rweight))
126ecdf
127+0.111111112, +0.177777782, +0.266666681, +0.466666698, +0.688888907, +0.888888896, +1.00000000
128
129call setResized(ecdf, getUnifRand(1_IK, 10_IK))
130call setResized(lcdf, size(ecdf, 1, IK))
131call setResized(ucdf, size(ecdf, 1, IK))
132call setECDF(ecdf, lcdf, ucdf)
133lcdf
134+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.102855057, +0.213966161, +0.325077266, +0.436188370, +0.547299504
135ecdf
136+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
137ucdf
138+0.563811660, +0.674922764, +0.786033869, +0.897144973, +1.00000000, +1.00000000, +1.00000000, +1.00000000, +1.00000000
139call setECDF(ecdf)
140ecdf
141+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
142
143iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
144iweight
145+6, +1, +6, +7, +7, +7, +6, +2, +1
146call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
147lcdf
148+0.00000000, +0.00000000, +0.952170640E-1, +0.258007765, +0.420798481, +0.583589196, +0.723124087, +0.769635737, +0.792891443
149ecdf
150+0.139534891, +0.162790701, +0.302325606, +0.465116322, +0.627907038, +0.790697753, +0.930232644, +0.976744294, +1.00000000
151ucdf
152+0.346643448, +0.369899243, +0.509434164, +0.672224879, +0.835015595, +0.997806311, +1.00000000, +1.00000000, +1.00000000
153
154rweight = iweight
155rweight
156+6.00000000, +1.00000000, +6.00000000, +7.00000000, +7.00000000, +7.00000000, +6.00000000, +2.00000000, +1.00000000
157call setECDF(ecdf, rweight, sum(rweight))
158ecdf
159+0.139534891, +0.162790701, +0.302325606, +0.465116322, +0.627907038, +0.790697753, +0.930232644, +0.976744294, +1.00000000
160
161call setResized(ecdf, getUnifRand(1_IK, 10_IK))
162call setResized(lcdf, size(ecdf, 1, IK))
163call setResized(ucdf, size(ecdf, 1, IK))
164call setECDF(ecdf, lcdf, ucdf)
165lcdf
166+1.00000000
167ecdf
168+1.00000000
169ucdf
170+1.00000000
171call setECDF(ecdf)
172ecdf
173+1.00000000
174
175iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
176iweight
177+3
178call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
179lcdf
180+1.00000000
181ecdf
182+1.00000000
183ucdf
184+1.00000000
185
186rweight = iweight
187rweight
188+3.00000000
189call setECDF(ecdf, rweight, sum(rweight))
190ecdf
191+1.00000000
192
193call setResized(ecdf, getUnifRand(1_IK, 10_IK))
194call setResized(lcdf, size(ecdf, 1, IK))
195call setResized(ucdf, size(ecdf, 1, IK))
196call setECDF(ecdf, lcdf, ucdf)
197lcdf
198+0.00000000, +0.00000000, +0.00000000, +0.581144691E-1, +0.200971603, +0.343828738, +0.486685872
199ecdf
200+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
201ucdf
202+0.656171262, +0.799028397, +0.941885591, +1.00000000, +1.00000000, +1.00000000, +1.00000000
203call setECDF(ecdf)
204ecdf
205+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
206
207iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
208iweight
209+7, +8, +2, +1, +3, +1, +7
210call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
211lcdf
212+0.00000000, +0.265048236, +0.334013730, +0.368496507, +0.471944779, +0.506427526, +0.747806907
213ecdf
214+0.241379306, +0.517241359, +0.586206853, +0.620689631, +0.724137902, +0.758620679, +1.00000000
215ucdf
216+0.493572414, +0.769434452, +0.838400006, +0.872882724, +0.976330996, +1.00000000, +1.00000000
217
218rweight = iweight
219rweight
220+7.00000000, +8.00000000, +2.00000000, +1.00000000, +3.00000000, +1.00000000, +7.00000000
221call setECDF(ecdf, rweight, sum(rweight))
222ecdf
223+0.241379306, +0.517241359, +0.586206853, +0.620689631, +0.724137902, +0.758620679, +1.00000000
224
225call setResized(ecdf, getUnifRand(1_IK, 10_IK))
226call setResized(lcdf, size(ecdf, 1, IK))
227call setResized(ucdf, size(ecdf, 1, IK))
228call setECDF(ecdf, lcdf, ucdf)
229lcdf
230+0.00000000, +0.00000000, +0.00000000, +0.112224042, +0.278890729, +0.445557356
231ecdf
232+0.166666672, +0.333333343, +0.500000000, +0.666666687, +0.833333373, +1.00000000
233ucdf
234+0.721109331, +0.887776017, +1.00000000, +1.00000000, +1.00000000, +1.00000000
235call setECDF(ecdf)
236ecdf
237+0.166666672, +0.333333343, +0.500000000, +0.666666687, +0.833333373, +1.00000000
238
239iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
240iweight
241+7, +9, +1, +7, +6, +3
242call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
243lcdf
244+0.00000000, +0.248433366, +0.278736353, +0.490857601, +0.672675788, +0.763584852
245ecdf
246+0.212121218, +0.484848499, +0.515151501, +0.727272749, +0.909090936, +1.00000000
247ucdf
248+0.448536336, +0.721263647, +0.751566648, +0.963687897, +1.00000000, +1.00000000
249
250rweight = iweight
251rweight
252+7.00000000, +9.00000000, +1.00000000, +7.00000000, +6.00000000, +3.00000000
253call setECDF(ecdf, rweight, sum(rweight))
254ecdf
255+0.212121218, +0.484848499, +0.515151501, +0.727272749, +0.909090936, +1.00000000
256
257call setResized(ecdf, getUnifRand(1_IK, 10_IK))
258call setResized(lcdf, size(ecdf, 1, IK))
259call setResized(ucdf, size(ecdf, 1, IK))
260call setECDF(ecdf, lcdf, ucdf)
261lcdf
262+0.00000000, +0.00000000, +0.215899706
263ecdf
264+0.333333343, +0.666666687, +1.00000000
265ucdf
266+1.00000000, +1.00000000, +1.00000000
267call setECDF(ecdf)
268ecdf
269+0.333333343, +0.666666687, +1.00000000
270
271iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
272iweight
273+9, +7, +1
274call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
275lcdf
276+0.200023800, +0.611788511, +0.670611978
277ecdf
278+0.529411793, +0.941176534, +1.00000000
279ucdf
280+0.858799815, +1.00000000, +1.00000000
281
282rweight = iweight
283rweight
284+9.00000000, +7.00000000, +1.00000000
285call setECDF(ecdf, rweight, sum(rweight))
286ecdf
287+0.529411793, +0.941176534, +1.00000000
288
289call setResized(ecdf, getUnifRand(1_IK, 10_IK))
290call setResized(lcdf, size(ecdf, 1, IK))
291call setResized(ucdf, size(ecdf, 1, IK))
292call setECDF(ecdf, lcdf, ucdf)
293lcdf
294+1.00000000
295ecdf
296+1.00000000
297ucdf
298+1.00000000
299call setECDF(ecdf)
300ecdf
301+1.00000000
302
303iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
304iweight
305+2
306call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
307lcdf
308+1.00000000
309ecdf
310+1.00000000
311ucdf
312+1.00000000
313
314rweight = iweight
315rweight
316+2.00000000
317call setECDF(ecdf, rweight, sum(rweight))
318ecdf
319+1.00000000
320
321

Visualization of the example output
Test:
test_pm_sampleECDF


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, April 21, 2017, 1:54 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 151 of file pm_sampleECDF.F90.


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