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

Return the (weighted) merged variance of a complex or real sample resulting from the merger of two separate (weighted) samples \(A\) and \(B\).
More...

Detailed Description

Return the (weighted) merged variance of a complex or real sample resulting from the merger of two separate (weighted) samples \(A\) and \(B\).

See the documentation of pm_sampleVar for more information and definition online updating of sample variance.

Note
The input and output variances of this generic interface are all biased variances.
A biased variance can be readily unbiased by multiplying it with the appropriate bias-correction factors detailed in the documentation of pm_sampleVar.
Parameters
[out]varMerged: The output object of the same type and kind and rank and shape as varA, containing the biased variance of the sample resulting form the merger of the two samples.
(optional. If missing, the resulting merged variance will be written to the argument varB.)
[in,out]varB: The input or input/output object of the same type and kind and rank and shape as the input argument varA, containing the biased variance of the second sample that must be merged with the first sample.
If the input argument varMerged is missing, then varB contains the updated biased variance of the merged sample on return.
Otherwise, the contents of varB remain intact upon return.
[in]varA: The input scalar or contiguous vector of shape (1:ndim) of type real of the same kind as the kind of the input argument meanDiff, containing the biased variance of the first sample that must be merged with the second sample.
[in]meanDiff: The input object of
  1. type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128),
  2. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
containing the difference of mean of the two samples meanDiff = meanA - meanB.
The subtraction order is immaterial.
[in]fracA: The input scalar of type real of the same kind as kind of varA, containing the ratio of the sum of the weights of all points in sample \(A\) to sum of weights of all points in the merged sample.
If the sample is unweighted, then fracA is simply size(sampleA) / (size(sampleA) + size(sampleB)).


Possible calling interfaces

! univariate sample
call setVarMerged( varB, varA, meanDiff, fracA)
call setVarMerged(varMerged, varB, varA, meanDiff, fracA)
! ndim-dimensional sample
call setVarMerged( varB(1:ndim), varA(1:ndim), meanDiff(1:ndim), fracA)
call setVarMerged(varMerged(1:ndim), varB(1:ndim), varA(1:ndim), meanDiff(1:ndim), fracA)
Return the (weighted) merged variance of a complex or real sample resulting from the merger of two se...
This module contains classes and procedures for computing the properties related to the covariance ma...
Warning
The condition 0 < fracA .and. fracA < 1 must hold for the corresponding input arguments.
The condition size(varB) == size(varA) must hold for the corresponding input arguments.
The condition size(varA) == size(meanDiff) must hold for the corresponding input arguments.
The condition size(varA) == size(varMearged) must hold for the corresponding input arguments.
The condition size(varA) == size(meanMearged) must hold for the corresponding input arguments.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
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
getCor
setCor
getCov
setCov
getVar
setVar
getMean
setMean
getCovMerged
setCovMerged
getVarMerged
setVarMerged
getMeanMerged
setMeanMerged
setVarMeanMerged


Example usage

1program example
2
3 use pm_kind, only: SK, IK
4 use pm_kind, only: TKG => RKS ! All other real types are also supported.
5 use pm_sampleVar, only: getVar
6 use pm_sampleMean, only: getMean
10 use pm_distUnif, only: getUnifRand
11 use pm_arrayRange, only: getRange
12 use pm_io, only: display_type
13
14 implicit none
15
16 integer(IK), parameter :: nsam = 2
17 integer(IK), allocatable :: iweight(:)
18 integer(IK) :: isam, ndim, lb(nsam), ub(nsam)
19 integer(IK) :: dim, itry, ntry = 5
20 type(display_type) :: disp
21 disp = display_type(file = "main.out.F90")
22
23 call disp%skip()
24 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
25 call disp%show("!Compute the biased merged variance of a univariate sample.")
26 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
27 call disp%skip()
28
29 block
30 real(TKG) :: mean(1:nsam)
31 real(TKG), allocatable :: sample(:)
32 real(TKG) :: var(0:nsam), varMerged
33 do itry = 1, ntry
34 call disp%skip()
35 call disp%show("lb(1) = 1; ub(1) = getUnifRand(2, 7)")
36 lb(1) = 1; ub(1) = getUnifRand(2, 7)
37 call disp%show("do isam = 2, nsam")
38 call disp%show(" lb(isam) = ub(isam - 1) + 1")
39 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
40 call disp%show("end do")
41 do isam = 2, nsam
42 lb(isam) = ub(isam - 1) + 1
43 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
44 end do
45 call disp%show("lb")
46 call disp%show( lb )
47 call disp%show("ub")
48 call disp%show( ub )
49 call disp%show("sample = getUnifRand(0., 1., ub(nsam))")
50 sample = getUnifRand(0., 1., ub(nsam))
51 call disp%show("sample")
52 call disp%show( sample )
53 call disp%show("var(0) = getVar(sample)")
54 var(0) = getVar(sample)
55 call disp%show("var(0) ! reference")
56 call disp%show( var(0) )
57 call disp%show("do isam = 1, nsam")
58 call disp%show(" var(isam) = getVar(sample(lb(isam):ub(isam)))")
59 call disp%show(" mean(isam) = getMean(sample(lb(isam):ub(isam)))")
60 call disp%show("end do")
61 do isam = 1, nsam
62 var(isam) = getVar(sample(lb(isam):ub(isam)))
63 mean(isam) = getMean(sample(lb(isam):ub(isam)))
64 end do
65 call disp%show("call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))")
66 call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
67 call disp%show("varMerged")
68 call disp%show( varMerged )
69 call disp%show("call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))")
70 call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
71 call disp%show("var(2)")
72 call disp%show( var(2) )
73 call disp%show("var(0) ! reference")
74 call disp%show( var(0) )
75 call disp%skip()
76 end do
77 end block
78
79 block
80 complex(TKG) :: mean(1:nsam)
81 complex(TKG), allocatable :: sample(:)
82 real(TKG) :: var(0:nsam), varMerged
83 do itry = 1, ntry
84 call disp%skip()
85 call disp%show("lb(1) = 1; ub(1) = getUnifRand(2, 7)")
86 lb(1) = 1; ub(1) = getUnifRand(2, 7)
87 call disp%show("do isam = 2, nsam")
88 call disp%show(" lb(isam) = ub(isam - 1) + 1")
89 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
90 call disp%show("end do")
91 do isam = 2, nsam
92 lb(isam) = ub(isam - 1) + 1
93 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
94 end do
95 call disp%show("lb")
96 call disp%show( lb )
97 call disp%show("ub")
98 call disp%show( ub )
99 call disp%show("sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)")
100 sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
101 call disp%show("sample")
102 call disp%show( sample )
103 call disp%show("var(0) = getVar(sample)")
104 var(0) = getVar(sample)
105 call disp%show("var(0) ! reference")
106 call disp%show( var(0) )
107 call disp%show("do isam = 1, nsam")
108 call disp%show(" var(isam) = getVar(sample(lb(isam):ub(isam)))")
109 call disp%show(" mean(isam) = getMean(sample(lb(isam):ub(isam)))")
110 call disp%show("end do")
111 do isam = 1, nsam
112 var(isam) = getVar(sample(lb(isam):ub(isam)))
113 mean(isam) = getMean(sample(lb(isam):ub(isam)))
114 end do
115 call disp%show("call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))")
116 call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
117 call disp%show("varMerged")
118 call disp%show( varMerged )
119 call disp%show("call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))")
120 call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
121 call disp%show("var(2)")
122 call disp%show( var(2) )
123 call disp%show("var(0) ! reference")
124 call disp%show( var(0) )
125 call disp%skip()
126 end do
127 end block
128
129 call disp%skip()
130 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
131 call disp%show("!Compute the biased merged variance of a frequency weighted univariate sample.")
132 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
133 call disp%skip()
134
135 block
136 real(TKG) :: mean(1:nsam)
137 real(TKG), allocatable :: sample(:)
138 real(TKG) :: var(0:nsam), varMerged
139 do itry = 1, ntry
140 call disp%skip()
141 call disp%show("lb(1) = 1; ub(1) = getUnifRand(2, 7)")
142 lb(1) = 1; ub(1) = getUnifRand(2, 7)
143 call disp%show("do isam = 2, nsam")
144 call disp%show(" lb(isam) = ub(isam - 1) + 1")
145 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
146 call disp%show("end do")
147 do isam = 2, nsam
148 lb(isam) = ub(isam - 1) + 1
149 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
150 end do
151 call disp%show("lb")
152 call disp%show( lb )
153 call disp%show("ub")
154 call disp%show( ub )
155 call disp%show("sample = getUnifRand(0., 1., ub(nsam))")
156 sample = getUnifRand(0., 1., ub(nsam))
157 call disp%show("sample")
158 call disp%show( sample )
159 call disp%show("iweight = getUnifRand(1, 10, size(sample, 1, IK))")
160 iweight = getUnifRand(1, 10, size(sample, 1, IK))
161 call disp%show("iweight")
162 call disp%show( iweight )
163 call disp%show("var(0) = getVar(sample, iweight)")
164 var(0) = getVar(sample, iweight)
165 call disp%show("var(0) ! reference")
166 call disp%show( var(0) )
167 call disp%show("do isam = 1, nsam")
168 call disp%show(" var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
169 call disp%show(" mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
170 call disp%show("end do")
171 do isam = 1, nsam
172 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
173 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
174 end do
175 call disp%show("call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
176 call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
177 call disp%show("varMerged")
178 call disp%show( varMerged )
179 call disp%show("call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
180 call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
181 call disp%show("var(2)")
182 call disp%show( var(2) )
183 call disp%show("var(0) ! reference")
184 call disp%show( var(0) )
185 call disp%skip()
186 end do
187 end block
188
189 block
190 complex(TKG) :: mean(1:nsam)
191 complex(TKG), allocatable :: sample(:)
192 real(TKG) :: var(0:nsam), varMerged
193 do itry = 1, ntry
194 call disp%skip()
195 call disp%show("lb(1) = 1; ub(1) = getUnifRand(2, 7)")
196 lb(1) = 1; ub(1) = getUnifRand(2, 7)
197 call disp%show("do isam = 2, nsam")
198 call disp%show(" lb(isam) = ub(isam - 1) + 1")
199 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
200 call disp%show("end do")
201 do isam = 2, nsam
202 lb(isam) = ub(isam - 1) + 1
203 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
204 end do
205 call disp%show("lb")
206 call disp%show( lb )
207 call disp%show("ub")
208 call disp%show( ub )
209 call disp%show("sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)")
210 sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
211 call disp%show("sample")
212 call disp%show( sample )
213 call disp%show("iweight = getUnifRand(1, 10, size(sample, 1, IK))")
214 iweight = getUnifRand(1, 10, size(sample, 1, IK))
215 call disp%show("iweight")
216 call disp%show( iweight )
217 call disp%show("var(0) = getVar(sample, iweight)")
218 var(0) = getVar(sample, iweight)
219 call disp%show("var(0) ! reference")
220 call disp%show( var(0) )
221 call disp%show("do isam = 1, nsam")
222 call disp%show(" var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
223 call disp%show(" mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
224 call disp%show("end do")
225 do isam = 1, nsam
226 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
227 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
228 end do
229 call disp%show("call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
230 call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
231 call disp%show("varMerged")
232 call disp%show( varMerged )
233 call disp%show("call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
234 call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
235 call disp%show("var(2)")
236 call disp%show( var(2) )
237 call disp%show("var(0) ! reference")
238 call disp%show( var(0) )
239 call disp%skip()
240 end do
241 end block
242
243 call disp%skip()
244 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
245 call disp%show("!Compute the biased merged variance of a reliability weighted univariate sample.")
246 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
247 call disp%skip()
248
249 block
250 real(TKG) :: mean(1:nsam)
251 real(TKG), allocatable :: sample(:)
252 real(TKG), allocatable :: rweight(:)
253 real(TKG) :: var(0:nsam), varMerged
254 do itry = 1, ntry
255 call disp%skip()
256 call disp%show("lb(1) = 1; ub(1) = getUnifRand(2, 7)")
257 lb(1) = 1; ub(1) = getUnifRand(2, 7)
258 call disp%show("do isam = 2, nsam")
259 call disp%show(" lb(isam) = ub(isam - 1) + 1")
260 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
261 call disp%show("end do")
262 do isam = 2, nsam
263 lb(isam) = ub(isam - 1) + 1
264 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
265 end do
266 call disp%show("lb")
267 call disp%show( lb )
268 call disp%show("ub")
269 call disp%show( ub )
270 call disp%show("sample = getUnifRand(0., 1., ub(nsam))")
271 sample = getUnifRand(0., 1., ub(nsam))
272 call disp%show("sample")
273 call disp%show( sample )
274 call disp%show("rweight = getUnifRand(1., 2., size(sample, 1, IK))")
275 rweight = getUnifRand(1., 2., size(sample, 1, IK))
276 call disp%show("rweight")
277 call disp%show( rweight )
278 call disp%show("var(0) = getVar(sample, rweight)")
279 var(0) = getVar(sample, rweight)
280 call disp%show("var(0) ! reference")
281 call disp%show( var(0) )
282 call disp%show("do isam = 1, nsam")
283 call disp%show(" var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
284 call disp%show(" mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
285 call disp%show("end do")
286 do isam = 1, nsam
287 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
288 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
289 end do
290 call disp%show("call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
291 call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
292 call disp%show("varMerged")
293 call disp%show( varMerged )
294 call disp%show("call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
295 call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
296 call disp%show("var(2)")
297 call disp%show( var(2) )
298 call disp%show("var(0) ! reference")
299 call disp%show( var(0) )
300 call disp%skip()
301 end do
302 end block
303
304 block
305 complex(TKG) :: mean(1:nsam)
306 complex(TKG), allocatable :: sample(:)
307 real(TKG), allocatable :: rweight(:)
308 real(TKG) :: var(0:nsam), varMerged
309 do itry = 1, ntry
310 call disp%skip()
311 call disp%show("lb(1) = 1; ub(1) = getUnifRand(2, 7)")
312 lb(1) = 1; ub(1) = getUnifRand(2, 7)
313 call disp%show("do isam = 2, nsam")
314 call disp%show(" lb(isam) = ub(isam - 1) + 1")
315 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
316 call disp%show("end do")
317 do isam = 2, nsam
318 lb(isam) = ub(isam - 1) + 1
319 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
320 end do
321 call disp%show("lb")
322 call disp%show( lb )
323 call disp%show("ub")
324 call disp%show( ub )
325 call disp%show("sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)")
326 sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
327 call disp%show("sample")
328 call disp%show( sample )
329 call disp%show("rweight = getUnifRand(1., 2., size(sample, 1, IK))")
330 rweight = getUnifRand(1., 2., size(sample, 1, IK))
331 call disp%show("rweight")
332 call disp%show( rweight )
333 call disp%show("var(0) = getVar(sample, rweight)")
334 var(0) = getVar(sample, rweight)
335 call disp%show("var(0) ! reference")
336 call disp%show( var(0) )
337 call disp%show("do isam = 1, nsam")
338 call disp%show(" var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
339 call disp%show(" mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
340 call disp%show("end do")
341 do isam = 1, nsam
342 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
343 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
344 end do
345 call disp%show("call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
346 call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
347 call disp%show("varMerged")
348 call disp%show( varMerged )
349 call disp%show("call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
350 call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
351 call disp%show("var(2)")
352 call disp%show( var(2) )
353 call disp%show("var(0) ! reference")
354 call disp%show( var(0) )
355 call disp%skip()
356 end do
357 end block
358
359 call disp%skip()
360 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
361 call disp%show("!Compute the biased merged variance of a multivariate sample.")
362 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
363 call disp%skip()
364
365 block
366 real(TKG), allocatable :: mean(:,:)
367 real(TKG), allocatable :: sample(:,:)
368 real(TKG), allocatable :: var(:,:), varMerged(:)
369 do itry = 1, ntry
370 call disp%skip()
371 call disp%show("dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
372 dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
373 call disp%show("do isam = 2, nsam")
374 call disp%show(" lb(isam) = ub(isam - 1) + 1")
375 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
376 call disp%show("end do")
377 do isam = 2, nsam
378 lb(isam) = ub(isam - 1) + 1
379 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
380 end do
381 call disp%show("lb")
382 call disp%show( lb )
383 call disp%show("ub")
384 call disp%show( ub )
385 call disp%show("ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
386 ndim = getUnifRand(1, minval(ub - lb + 1, 1))
387 call disp%show("call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
388 call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
389 call disp%show("call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])")
390 call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
391 call disp%show("call setResized(varMerged, ndim)")
392 call setResized(varMerged, ndim)
393 call disp%show("sample = getUnifRand(-1., +1., ndim, ub(nsam))")
394 sample = getUnifRand(-1., +1., ndim, ub(nsam))
395 call disp%show("sample")
396 call disp%show( sample )
397 call disp%show("var(:,0) = getVar(sample, dim)")
398 var(:,0) = getVar(sample, dim)
399 call disp%show("var(:,0) ! reference")
400 call disp%show( var(:,0) )
401 call disp%show("do isam = 1, nsam")
402 call disp%show(" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)")
403 call disp%show(" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)")
404 call disp%show("end do")
405 do isam = 1, nsam
406 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
407 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
408 end do
409 call disp%show("call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))")
410 call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
411 call disp%show("varMerged")
412 call disp%show( varMerged )
413 call disp%show("call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))")
414 call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
415 call disp%show("var(:,2)")
416 call disp%show( var(:,2) )
417 call disp%show("var(:,0) ! reference")
418 call disp%show( var(:,0) )
419 call disp%skip()
420 end do
421 end block
422
423 block
424 complex(TKG), allocatable :: mean(:,:)
425 complex(TKG), allocatable :: sample(:,:)
426 real(TKG), allocatable :: var(:,:), varMerged(:)
427 do itry = 1, ntry
428 call disp%skip()
429 call disp%show("dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
430 dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
431 call disp%show("do isam = 2, nsam")
432 call disp%show(" lb(isam) = ub(isam - 1) + 1")
433 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
434 call disp%show("end do")
435 do isam = 2, nsam
436 lb(isam) = ub(isam - 1) + 1
437 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
438 end do
439 call disp%show("lb")
440 call disp%show( lb )
441 call disp%show("ub")
442 call disp%show( ub )
443 call disp%show("ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
444 ndim = getUnifRand(1, minval(ub - lb + 1, 1))
445 call disp%show("call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
446 call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
447 call disp%show("call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])")
448 call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
449 call disp%show("call setResized(varMerged, ndim)")
450 call setResized(varMerged, ndim)
451 call disp%show("sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)")
452 sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
453 call disp%show("sample")
454 call disp%show( sample )
455 call disp%show("var(:,0) = getVar(sample, dim)")
456 var(:,0) = getVar(sample, dim)
457 call disp%show("var(:,0) ! reference")
458 call disp%show( var(:,0) )
459 call disp%show("do isam = 1, nsam")
460 call disp%show(" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)")
461 call disp%show(" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)")
462 call disp%show("end do")
463 do isam = 1, nsam
464 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
465 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
466 end do
467 call disp%show("call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))")
468 call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
469 call disp%show("varMerged")
470 call disp%show( varMerged )
471 call disp%show("call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))")
472 call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
473 call disp%show("var(:,2)")
474 call disp%show( var(:,2) )
475 call disp%show("var(:,0) ! reference")
476 call disp%show( var(:,0) )
477 call disp%skip()
478 end do
479 end block
480
481 call disp%skip()
482 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
483 call disp%show("!Compute the biased merged variance of a frequency weighted multivariate sample.")
484 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
485 call disp%skip()
486
487 block
488 real(TKG), allocatable :: mean(:,:)
489 real(TKG), allocatable :: sample(:,:)
490 real(TKG), allocatable :: var(:,:), varMerged(:)
491 do itry = 1, ntry
492 call disp%skip()
493 call disp%show("dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
494 dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
495 call disp%show("do isam = 2, nsam")
496 call disp%show(" lb(isam) = ub(isam - 1) + 1")
497 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
498 call disp%show("end do")
499 do isam = 2, nsam
500 lb(isam) = ub(isam - 1) + 1
501 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
502 end do
503 call disp%show("lb")
504 call disp%show( lb )
505 call disp%show("ub")
506 call disp%show( ub )
507 call disp%show("ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
508 ndim = getUnifRand(1, minval(ub - lb + 1, 1))
509 call disp%show("call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
510 call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
511 call disp%show("call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])")
512 call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
513 call disp%show("call setResized(varMerged, ndim)")
514 call setResized(varMerged, ndim)
515 call disp%show("sample = getUnifRand(-1., +1., ndim, ub(nsam))")
516 sample = getUnifRand(-1., +1., ndim, ub(nsam))
517 call disp%show("sample")
518 call disp%show( sample )
519 call disp%show("iweight = getUnifRand(1, 10, size(sample, dim, IK))")
520 iweight = getUnifRand(1, 10, size(sample, dim, IK))
521 call disp%show("iweight")
522 call disp%show( iweight )
523 call disp%show("var(:,0) = getVar(sample, 2_IK, iweight)")
524 var(:,0) = getVar(sample, 2_IK, iweight)
525 call disp%show("var(:,0) ! reference")
526 call disp%show( var(:,0) )
527 call disp%show("do isam = 1, nsam")
528 call disp%show(" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
529 call disp%show(" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
530 call disp%show("end do")
531 do isam = 1, nsam
532 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
533 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
534 end do
535 call disp%show("call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
536 call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
537 call disp%show("varMerged")
538 call disp%show( varMerged )
539 call disp%show("call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
540 call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
541 call disp%show("var(:,2)")
542 call disp%show( var(:,2) )
543 call disp%show("var(:,0) ! reference")
544 call disp%show( var(:,0) )
545 call disp%skip()
546 end do
547 end block
548
549 block
550 complex(TKG), allocatable :: mean(:,:)
551 complex(TKG), allocatable :: sample(:,:)
552 real(TKG), allocatable :: var(:,:), varMerged(:)
553 do itry = 1, ntry
554 call disp%skip()
555 call disp%show("dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
556 dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
557 call disp%show("do isam = 2, nsam")
558 call disp%show(" lb(isam) = ub(isam - 1) + 1")
559 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
560 call disp%show("end do")
561 do isam = 2, nsam
562 lb(isam) = ub(isam - 1) + 1
563 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
564 end do
565 call disp%show("lb")
566 call disp%show( lb )
567 call disp%show("ub")
568 call disp%show( ub )
569 call disp%show("ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
570 ndim = getUnifRand(1, minval(ub - lb + 1, 1))
571 call disp%show("call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
572 call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
573 call disp%show("call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])")
574 call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
575 call disp%show("call setResized(varMerged, ndim)")
576 call setResized(varMerged, ndim)
577 call disp%show("sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)")
578 sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
579 call disp%show("sample")
580 call disp%show( sample )
581 call disp%show("iweight = getUnifRand(1, 10, size(sample, dim, IK))")
582 iweight = getUnifRand(1, 10, size(sample, dim, IK))
583 call disp%show("iweight")
584 call disp%show( iweight )
585 call disp%show("var(:,0) = getVar(sample, 2_IK, iweight)")
586 var(:,0) = getVar(sample, 2_IK, iweight)
587 call disp%show("var(:,0) ! reference")
588 call disp%show( var(:,0) )
589 call disp%show("do isam = 1, nsam")
590 call disp%show(" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
591 call disp%show(" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
592 call disp%show("end do")
593 do isam = 1, nsam
594 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
595 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
596 end do
597 call disp%show("call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
598 call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
599 call disp%show("varMerged")
600 call disp%show( varMerged )
601 call disp%show("call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
602 call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
603 call disp%show("var(:,2)")
604 call disp%show( var(:,2) )
605 call disp%show("var(:,0) ! reference")
606 call disp%show( var(:,0) )
607 call disp%skip()
608 end do
609 end block
610
611 call disp%skip()
612 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
613 call disp%show("!Compute the biased merged variance of a reliability weighted multivariate sample.")
614 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
615 call disp%skip()
616
617 block
618 real(TKG), allocatable :: mean(:,:)
619 real(TKG), allocatable :: sample(:,:)
620 real(TKG), allocatable :: var(:,:), varMerged(:)
621 real(TKG), allocatable :: rweight(:)
622 do itry = 1, ntry
623 call disp%skip()
624 call disp%show("dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
625 dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
626 call disp%show("do isam = 2, nsam")
627 call disp%show(" lb(isam) = ub(isam - 1) + 1")
628 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
629 call disp%show("end do")
630 do isam = 2, nsam
631 lb(isam) = ub(isam - 1) + 1
632 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
633 end do
634 call disp%show("lb")
635 call disp%show( lb )
636 call disp%show("ub")
637 call disp%show( ub )
638 call disp%show("ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
639 ndim = getUnifRand(1, minval(ub - lb + 1, 1))
640 call disp%show("call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
641 call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
642 call disp%show("call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])")
643 call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
644 call disp%show("call setResized(varMerged, ndim)")
645 call setResized(varMerged, ndim)
646 call disp%show("sample = getUnifRand(-1., +1., ndim, ub(nsam))")
647 sample = getUnifRand(-1., +1., ndim, ub(nsam))
648 call disp%show("sample")
649 call disp%show( sample )
650 call disp%show("rweight = getUnifRand(1., 2., size(sample, dim, IK))")
651 rweight = getUnifRand(1., 2., size(sample, dim, IK))
652 call disp%show("rweight")
653 call disp%show( rweight )
654 call disp%show("var(:,0) = getVar(sample, 2_IK, rweight)")
655 var(:,0) = getVar(sample, 2_IK, rweight)
656 call disp%show("var(:,0) ! reference")
657 call disp%show( var(:,0) )
658 call disp%show("do isam = 1, nsam")
659 call disp%show(" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
660 call disp%show(" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
661 call disp%show("end do")
662 do isam = 1, nsam
663 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
664 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
665 end do
666 call disp%show("call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
667 call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
668 call disp%show("varMerged")
669 call disp%show( varMerged )
670 call disp%show("call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
671 call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
672 call disp%show("var(:,2)")
673 call disp%show( var(:,2) )
674 call disp%show("var(:,0) ! reference")
675 call disp%show( var(:,0) )
676 call disp%skip()
677 end do
678 end block
679
680 block
681 complex(TKG), allocatable :: mean(:,:)
682 complex(TKG), allocatable :: sample(:,:)
683 real(TKG), allocatable :: var(:,:), varMerged(:)
684 real(TKG), allocatable :: rweight(:)
685 do itry = 1, ntry
686 call disp%skip()
687 call disp%show("dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
688 dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
689 call disp%show("do isam = 2, nsam")
690 call disp%show(" lb(isam) = ub(isam - 1) + 1")
691 call disp%show(" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
692 call disp%show("end do")
693 do isam = 2, nsam
694 lb(isam) = ub(isam - 1) + 1
695 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
696 end do
697 call disp%show("lb")
698 call disp%show( lb )
699 call disp%show("ub")
700 call disp%show( ub )
701 call disp%show("ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
702 ndim = getUnifRand(1, minval(ub - lb + 1, 1))
703 call disp%show("call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
704 call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
705 call disp%show("call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])")
706 call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
707 call disp%show("call setResized(varMerged, ndim)")
708 call setResized(varMerged, ndim)
709 call disp%show("sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)")
710 sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
711 call disp%show("sample")
712 call disp%show( sample )
713 call disp%show("rweight = getUnifRand(1., 2., size(sample, dim, IK))")
714 rweight = getUnifRand(1., 2., size(sample, dim, IK))
715 call disp%show("rweight")
716 call disp%show( rweight )
717 call disp%show("var(:,0) = getVar(sample, 2_IK, rweight)")
718 var(:,0) = getVar(sample, 2_IK, rweight)
719 call disp%show("var(:,0) ! reference")
720 call disp%show( var(:,0) )
721 call disp%show("do isam = 1, nsam")
722 call disp%show(" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
723 call disp%show(" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
724 call disp%show("end do")
725 do isam = 1, nsam
726 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
727 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
728 end do
729 call disp%show("call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
730 call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
731 call disp%show("varMerged")
732 call disp%show( varMerged )
733 call disp%show("call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
734 call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
735 call disp%show("var(:,2)")
736 call disp%show( var(:,2) )
737 call disp%show("var(:,0) ! reference")
738 call disp%show( var(:,0) )
739 call disp%skip()
740 end do
741 end block
742
743end program example
Generate minimally-spaced character, integer, real sequences or sequences at fixed intervals of size ...
Resize (shrink or expand) an input allocatable array of rank 1..3 to arbitrary new lower and upper bo...
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
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 (weighted) mean of an input sample of nsam observations with ndim = 1 or 2 at...
Generate and return the variance of the input sample of type complex or real of shape (nsam) or (ndim...
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 resizing allocatable arrays of various typ...
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 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 classes and procedures for computing the first moment (i.e., the statistical mea...
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
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3!Compute the biased merged variance of a univariate sample.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7lb(1) = 1; ub(1) = getUnifRand(2, 7)
8do isam = 2, nsam
9 lb(isam) = ub(isam - 1) + 1
10 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
11end do
12lb
13+1, +8
14ub
15+7, +12
16sample = getUnifRand(0., 1., ub(nsam))
17sample
18+0.236855209, +0.877107561, +0.563862205, +0.292695999, +0.720593929, +0.919563651, +0.362283826, +0.609924853, +0.221994400, +0.262477398, +0.168956518, +0.800897419
19var(0) = getVar(sample)
20var(0) ! reference
21+0.706642494E-1
22do isam = 1, nsam
23 var(isam) = getVar(sample(lb(isam):ub(isam)))
24 mean(isam) = getMean(sample(lb(isam):ub(isam)))
25end do
26call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
27varMerged
28+0.706642419E-1
29call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
30var(2)
31+0.706642419E-1
32var(0) ! reference
33+0.706642494E-1
34
35
36lb(1) = 1; ub(1) = getUnifRand(2, 7)
37do isam = 2, nsam
38 lb(isam) = ub(isam - 1) + 1
39 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
40end do
41lb
42+1, +8
43ub
44+7, +14
45sample = getUnifRand(0., 1., ub(nsam))
46sample
47+0.258127451, +0.369691730, +0.938553154, +0.731491446E-1, +0.517028511, +0.657128394, +0.673815966, +0.580837905, +0.451651394, +0.933190346, +0.584189475, +0.400686562, +0.496799886, +0.711368203
48var(0) = getVar(sample)
49var(0) ! reference
50+0.523957200E-1
51do isam = 1, nsam
52 var(isam) = getVar(sample(lb(isam):ub(isam)))
53 mean(isam) = getMean(sample(lb(isam):ub(isam)))
54end do
55call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
56varMerged
57+0.523957126E-1
58call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
59var(2)
60+0.523957126E-1
61var(0) ! reference
62+0.523957200E-1
63
64
65lb(1) = 1; ub(1) = getUnifRand(2, 7)
66do isam = 2, nsam
67 lb(isam) = ub(isam - 1) + 1
68 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
69end do
70lb
71+1, +5
72ub
73+4, +6
74sample = getUnifRand(0., 1., ub(nsam))
75sample
76+0.755505562, +0.356884181, +0.841120601, +0.982695699, +0.308003664, +0.403299391
77var(0) = getVar(sample)
78var(0) ! reference
79+0.685765371E-1
80do isam = 1, nsam
81 var(isam) = getVar(sample(lb(isam):ub(isam)))
82 mean(isam) = getMean(sample(lb(isam):ub(isam)))
83end do
84call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
85varMerged
86+0.685765445E-1
87call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
88var(2)
89+0.685765445E-1
90var(0) ! reference
91+0.685765371E-1
92
93
94lb(1) = 1; ub(1) = getUnifRand(2, 7)
95do isam = 2, nsam
96 lb(isam) = ub(isam - 1) + 1
97 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
98end do
99lb
100+1, +7
101ub
102+6, +13
103sample = getUnifRand(0., 1., ub(nsam))
104sample
105+0.395944655, +0.695265591, +0.939120889, +0.613342345, +0.772848904, +0.542234719, +0.400380135, +0.882653058, +0.775582969, +0.203505754, +0.105733454, +0.950586200E-1, +0.668629885
106var(0) = getVar(sample)
107var(0) ! reference
108+0.747782886E-1
109do isam = 1, nsam
110 var(isam) = getVar(sample(lb(isam):ub(isam)))
111 mean(isam) = getMean(sample(lb(isam):ub(isam)))
112end do
113call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
114varMerged
115+0.747783035E-1
116call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
117var(2)
118+0.747783035E-1
119var(0) ! reference
120+0.747782886E-1
121
122
123lb(1) = 1; ub(1) = getUnifRand(2, 7)
124do isam = 2, nsam
125 lb(isam) = ub(isam - 1) + 1
126 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
127end do
128lb
129+1, +4
130ub
131+3, +5
132sample = getUnifRand(0., 1., ub(nsam))
133sample
134+0.406342030, +0.210675240, +0.395540297, +0.964472294, +0.163763702
135var(0) = getVar(sample)
136var(0) ! reference
137+0.812751874E-1
138do isam = 1, nsam
139 var(isam) = getVar(sample(lb(isam):ub(isam)))
140 mean(isam) = getMean(sample(lb(isam):ub(isam)))
141end do
142call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
143varMerged
144+0.812751949E-1
145call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
146var(2)
147+0.812751949E-1
148var(0) ! reference
149+0.812751874E-1
150
151
152lb(1) = 1; ub(1) = getUnifRand(2, 7)
153do isam = 2, nsam
154 lb(isam) = ub(isam - 1) + 1
155 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
156end do
157lb
158+1, +5
159ub
160+4, +6
161sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
162sample
163(+0.205783188, -0.668440104), (+0.563008845, -0.615207732), (+0.191206574, -0.488962173), (+0.988444567, -0.732576430), (+0.236289620, -0.979832649), (+0.559459269, -0.614318430)
164var(0) = getVar(sample)
165var(0) ! reference
166+0.104063362
167do isam = 1, nsam
168 var(isam) = getVar(sample(lb(isam):ub(isam)))
169 mean(isam) = getMean(sample(lb(isam):ub(isam)))
170end do
171call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
172varMerged
173+0.104063369
174call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
175var(2)
176+0.104063369
177var(0) ! reference
178+0.104063362
179
180
181lb(1) = 1; ub(1) = getUnifRand(2, 7)
182do isam = 2, nsam
183 lb(isam) = ub(isam - 1) + 1
184 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
185end do
186lb
187+1, +4
188ub
189+3, +7
190sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
191sample
192(+0.611136615, -0.799884200E-1), (+0.402274549, -0.428463161), (+0.549154043, -0.176954150), (+0.228771091, -0.568082392), (+0.117452383, -0.802794099), (+0.278396845, -0.577502847E-1), (+0.241611958, -0.312570930E-1)
193var(0) = getVar(sample)
194var(0) ! reference
195+0.104500838
196do isam = 1, nsam
197 var(isam) = getVar(sample(lb(isam):ub(isam)))
198 mean(isam) = getMean(sample(lb(isam):ub(isam)))
199end do
200call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
201varMerged
202+0.104500815
203call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
204var(2)
205+0.104500815
206var(0) ! reference
207+0.104500838
208
209
210lb(1) = 1; ub(1) = getUnifRand(2, 7)
211do isam = 2, nsam
212 lb(isam) = ub(isam - 1) + 1
213 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
214end do
215lb
216+1, +4
217ub
218+3, +6
219sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
220sample
221(+0.345527470, -0.646727145), (+0.532139599, -0.489553273), (+0.798932135, -0.753813744), (+0.208585858, -0.355174184), (+0.346092284, -0.415307701), (+0.894765735, -0.923504531)
222var(0) = getVar(sample)
223var(0) ! reference
224+0.102126919
225do isam = 1, nsam
226 var(isam) = getVar(sample(lb(isam):ub(isam)))
227 mean(isam) = getMean(sample(lb(isam):ub(isam)))
228end do
229call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
230varMerged
231+0.102126926
232call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
233var(2)
234+0.102126926
235var(0) ! reference
236+0.102126919
237
238
239lb(1) = 1; ub(1) = getUnifRand(2, 7)
240do isam = 2, nsam
241 lb(isam) = ub(isam - 1) + 1
242 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
243end do
244lb
245+1, +7
246ub
247+6, +8
248sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
249sample
250(+0.820149779, -0.757490993E-1), (+0.480538487, -0.532650888), (+0.689979076, -0.206232011), (+0.163781941, -0.679097712), (+0.178431809, -0.451079369), (+0.153526127, -0.136835814), (+0.339431047, -0.441869199), (+0.638606906, -0.135498941)
251var(0) = getVar(sample)
252var(0) ! reference
253+0.103721604
254do isam = 1, nsam
255 var(isam) = getVar(sample(lb(isam):ub(isam)))
256 mean(isam) = getMean(sample(lb(isam):ub(isam)))
257end do
258call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
259varMerged
260+0.103721596
261call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
262var(2)
263+0.103721596
264var(0) ! reference
265+0.103721604
266
267
268lb(1) = 1; ub(1) = getUnifRand(2, 7)
269do isam = 2, nsam
270 lb(isam) = ub(isam - 1) + 1
271 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
272end do
273lb
274+1, +6
275ub
276+5, +12
277sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
278sample
279(+0.962052107, -0.260187566), (+0.651694894, -0.681126833), (+0.763382852, -0.421721816), (+0.395484567E-1, -0.535844386), (+0.504895568, -0.648358941), (+0.807628632, -0.835161030), (+0.990456283, -0.981930375), (+0.240927935E-2, -0.740759790), (+0.508278072, -0.802620351), (+0.883328676, -0.548565924), (+0.590028107, -0.970175743), (+0.381916881, -0.288337946)
280var(0) = getVar(sample)
281var(0) ! reference
282+0.150716081
283do isam = 1, nsam
284 var(isam) = getVar(sample(lb(isam):ub(isam)))
285 mean(isam) = getMean(sample(lb(isam):ub(isam)))
286end do
287call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
288varMerged
289+0.150716081
290call setVarMerged(var(2), var(1), mean(1) - mean(2), ub(1) / real(ub(2), TKG))
291var(2)
292+0.150716081
293var(0) ! reference
294+0.150716081
295
296
297!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
298!Compute the biased merged variance of a frequency weighted univariate sample.
299!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300
301
302lb(1) = 1; ub(1) = getUnifRand(2, 7)
303do isam = 2, nsam
304 lb(isam) = ub(isam - 1) + 1
305 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
306end do
307lb
308+1, +4
309ub
310+3, +7
311sample = getUnifRand(0., 1., ub(nsam))
312sample
313+0.831896007, +0.445458889, +0.742067397, +0.434750617, +0.217321098, +0.601893902, +0.589478970
314iweight = getUnifRand(1, 10, size(sample, 1, IK))
315iweight
316+10, +3, +1, +4, +10, +4, +1
317var(0) = getVar(sample, iweight)
318var(0) ! reference
319+0.610603429E-1
320do isam = 1, nsam
321 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
322 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
323end do
324call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
325varMerged
326+0.610603280E-1
327call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
328var(2)
329+0.610603280E-1
330var(0) ! reference
331+0.610603429E-1
332
333
334lb(1) = 1; ub(1) = getUnifRand(2, 7)
335do isam = 2, nsam
336 lb(isam) = ub(isam - 1) + 1
337 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
338end do
339lb
340+1, +7
341ub
342+6, +11
343sample = getUnifRand(0., 1., ub(nsam))
344sample
345+0.903922439, +0.192609429E-1, +0.640145123, +0.764893174, +0.452666879, +0.793503642, +0.472412467, +0.637158692, +0.124651194E-2, +0.254662991, +0.852246583
346iweight = getUnifRand(1, 10, size(sample, 1, IK))
347iweight
348+4, +7, +10, +6, +1, +10, +4, +1, +9, +5, +6
349var(0) = getVar(sample, iweight)
350var(0) ! reference
351+0.111947380
352do isam = 1, nsam
353 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
354 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
355end do
356call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
357varMerged
358+0.111947395
359call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
360var(2)
361+0.111947395
362var(0) ! reference
363+0.111947380
364
365
366lb(1) = 1; ub(1) = getUnifRand(2, 7)
367do isam = 2, nsam
368 lb(isam) = ub(isam - 1) + 1
369 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
370end do
371lb
372+1, +5
373ub
374+4, +6
375sample = getUnifRand(0., 1., ub(nsam))
376sample
377+0.615280688, +0.855780840, +0.986616552, +0.732866764, +0.196430206, +0.191342950
378iweight = getUnifRand(1, 10, size(sample, 1, IK))
379iweight
380+2, +8, +9, +6, +5, +6
381var(0) = getVar(sample, iweight)
382var(0) ! reference
383+0.102577925
384do isam = 1, nsam
385 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
386 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
387end do
388call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
389varMerged
390+0.102577925
391call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
392var(2)
393+0.102577925
394var(0) ! reference
395+0.102577925
396
397
398lb(1) = 1; ub(1) = getUnifRand(2, 7)
399do isam = 2, nsam
400 lb(isam) = ub(isam - 1) + 1
401 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
402end do
403lb
404+1, +7
405ub
406+6, +9
407sample = getUnifRand(0., 1., ub(nsam))
408sample
409+0.273873806, +0.136870861, +0.663718164, +0.672795534, +0.689917088, +0.991191745, +0.792972147, +0.744936466, +0.472849488
410iweight = getUnifRand(1, 10, size(sample, 1, IK))
411iweight
412+5, +3, +1, +9, +10, +2, +5, +1, +2
413var(0) = getVar(sample, iweight)
414var(0) ! reference
415+0.487365872E-1
416do isam = 1, nsam
417 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
418 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
419end do
420call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
421varMerged
422+0.487365946E-1
423call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
424var(2)
425+0.487365946E-1
426var(0) ! reference
427+0.487365872E-1
428
429
430lb(1) = 1; ub(1) = getUnifRand(2, 7)
431do isam = 2, nsam
432 lb(isam) = ub(isam - 1) + 1
433 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
434end do
435lb
436+1, +8
437ub
438+7, +14
439sample = getUnifRand(0., 1., ub(nsam))
440sample
441+0.317809343, +0.239628911, +0.386704385, +0.619418263, +0.556626856, +0.970212579, +0.240564942E-1, +0.769567490E-1, +0.580120981, +0.310900152, +0.344494045, +0.797150075, +0.393653095, +0.676623166
442iweight = getUnifRand(1, 10, size(sample, 1, IK))
443iweight
444+5, +5, +10, +7, +3, +4, +2, +4, +2, +5, +1, +4, +5, +2
445var(0) = getVar(sample, iweight)
446var(0) ! reference
447+0.564065948E-1
448do isam = 1, nsam
449 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
450 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
451end do
452call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
453varMerged
454+0.564065911E-1
455call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
456var(2)
457+0.564065911E-1
458var(0) ! reference
459+0.564065948E-1
460
461
462lb(1) = 1; ub(1) = getUnifRand(2, 7)
463do isam = 2, nsam
464 lb(isam) = ub(isam - 1) + 1
465 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
466end do
467lb
468+1, +7
469ub
470+6, +8
471sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
472sample
473(+0.140144587, -0.114454091), (+0.134973049, -0.412263691), (+0.956579685, -0.622961283), (+0.412264109, -0.993405819), (+0.238980889, -0.192279875), (+0.401762903, -0.785840571), (+0.200900376, -0.476518214), (+0.114926159, -0.147012651)
474iweight = getUnifRand(1, 10, size(sample, 1, IK))
475iweight
476+6, +2, +3, +2, +2, +8, +8, +2
477var(0) = getVar(sample, iweight)
478var(0) ! reference
479+0.130008027
480do isam = 1, nsam
481 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
482 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
483end do
484call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
485varMerged
486+0.130008012
487call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
488var(2)
489+0.130008012
490var(0) ! reference
491+0.130008027
492
493
494lb(1) = 1; ub(1) = getUnifRand(2, 7)
495do isam = 2, nsam
496 lb(isam) = ub(isam - 1) + 1
497 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
498end do
499lb
500+1, +7
501ub
502+6, +8
503sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
504sample
505(+0.695154548, -0.268730462), (+0.779327810, -0.836526215), (+0.749404132, -0.954147041), (+0.817313313, -0.520079434), (+0.917474866, -0.524152279), (+0.762957692, -0.341134012), (+0.222535789, -0.739952326E-1), (+0.156496763E-1, -0.920202553)
506iweight = getUnifRand(1, 10, size(sample, 1, IK))
507iweight
508+9, +8, +10, +1, +1, +8, +5, +1
509var(0) = getVar(sample, iweight)
510var(0) ! reference
511+0.148088872
512do isam = 1, nsam
513 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
514 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
515end do
516call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
517varMerged
518+0.148088902
519call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
520var(2)
521+0.148088902
522var(0) ! reference
523+0.148088872
524
525
526lb(1) = 1; ub(1) = getUnifRand(2, 7)
527do isam = 2, nsam
528 lb(isam) = ub(isam - 1) + 1
529 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
530end do
531lb
532+1, +7
533ub
534+6, +8
535sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
536sample
537(+0.673228920, -0.575892329), (+0.973241568, -0.291249335), (+0.128819585, -0.703747511), (+0.400726318, -0.944059432), (+0.263965249, -0.325895965), (+0.145926893, -0.434251189), (+0.707832634, -0.508611441), (+0.230970740, -0.391210616)
538iweight = getUnifRand(1, 10, size(sample, 1, IK))
539iweight
540+3, +2, +3, +6, +4, +1, +3, +2
541var(0) = getVar(sample, iweight)
542var(0) ! reference
543+0.121535242
544do isam = 1, nsam
545 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
546 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
547end do
548call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
549varMerged
550+0.121535249
551call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
552var(2)
553+0.121535249
554var(0) ! reference
555+0.121535242
556
557
558lb(1) = 1; ub(1) = getUnifRand(2, 7)
559do isam = 2, nsam
560 lb(isam) = ub(isam - 1) + 1
561 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
562end do
563lb
564+1, +4
565ub
566+3, +5
567sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
568sample
569(+0.804554105, -0.324833274), (+0.130345762, -0.287388802), (+0.778544843, -0.358958244), (+0.349205613, -0.315623939), (+0.183954179, -0.239374399)
570iweight = getUnifRand(1, 10, size(sample, 1, IK))
571iweight
572+5, +4, +1, +3, +9
573var(0) = getVar(sample, iweight)
574var(0) ! reference
575+0.767259300E-1
576do isam = 1, nsam
577 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
578 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
579end do
580call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
581varMerged
582+0.767259300E-1
583call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
584var(2)
585+0.767259300E-1
586var(0) ! reference
587+0.767259300E-1
588
589
590lb(1) = 1; ub(1) = getUnifRand(2, 7)
591do isam = 2, nsam
592 lb(isam) = ub(isam - 1) + 1
593 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
594end do
595lb
596+1, +6
597ub
598+5, +7
599sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
600sample
601(+0.979441524, -0.201656401), (+0.391464889, -0.156690061), (+0.842554748, -0.901046216), (+0.915718138, -0.233983219), (+0.316007733, -0.632831752), (+0.247635245E-1, -0.769020736), (+0.368250966, -0.206292927)
602iweight = getUnifRand(1, 10, size(sample, 1, IK))
603iweight
604+3, +7, +5, +4, +2, +8, +10
605var(0) = getVar(sample, iweight)
606var(0) ! reference
607+0.192040011
608do isam = 1, nsam
609 var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
610 mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
611end do
612call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
613varMerged
614+0.192040011
615call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
616var(2)
617+0.192040011
618var(0) ! reference
619+0.192040011
620
621
622!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
623!Compute the biased merged variance of a reliability weighted univariate sample.
624!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
625
626
627lb(1) = 1; ub(1) = getUnifRand(2, 7)
628do isam = 2, nsam
629 lb(isam) = ub(isam - 1) + 1
630 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
631end do
632lb
633+1, +3
634ub
635+2, +4
636sample = getUnifRand(0., 1., ub(nsam))
637sample
638+0.242053330, +0.197725952, +0.640726089, +0.707876146
639rweight = getUnifRand(1., 2., size(sample, 1, IK))
640rweight
641+1.12574744, +1.18475223, +1.50256002, +1.45148182
642var(0) = getVar(sample, rweight)
643var(0) ! reference
644+0.516956076E-1
645do isam = 1, nsam
646 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
647 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
648end do
649call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
650varMerged
651+0.516956151E-1
652call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
653var(2)
654+0.516956151E-1
655var(0) ! reference
656+0.516956076E-1
657
658
659lb(1) = 1; ub(1) = getUnifRand(2, 7)
660do isam = 2, nsam
661 lb(isam) = ub(isam - 1) + 1
662 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
663end do
664lb
665+1, +4
666ub
667+3, +5
668sample = getUnifRand(0., 1., ub(nsam))
669sample
670+0.682939410, +0.994493067, +0.444927216E-1, +0.657842338, +0.384872079
671rweight = getUnifRand(1., 2., size(sample, 1, IK))
672rweight
673+1.70974791, +1.23650479, +1.85955095, +1.34748793, +1.76094019
674var(0) = getVar(sample, rweight)
675var(0) ! reference
676+0.101255432
677do isam = 1, nsam
678 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
679 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
680end do
681call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
682varMerged
683+0.101255439
684call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
685var(2)
686+0.101255439
687var(0) ! reference
688+0.101255432
689
690
691lb(1) = 1; ub(1) = getUnifRand(2, 7)
692do isam = 2, nsam
693 lb(isam) = ub(isam - 1) + 1
694 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
695end do
696lb
697+1, +4
698ub
699+3, +9
700sample = getUnifRand(0., 1., ub(nsam))
701sample
702+0.724007666, +0.472180367, +0.352650940, +0.960659981, +0.247492194, +0.719380915, +0.352443516, +0.951832294, +0.458069205
703rweight = getUnifRand(1., 2., size(sample, 1, IK))
704rweight
705+1.65979838, +1.03658915, +1.45550394, +1.32170165, +1.56400168, +1.24043298, +1.56641293, +1.88196707, +1.75016248
706var(0) = getVar(sample, rweight)
707var(0) ! reference
708+0.650807917E-1
709do isam = 1, nsam
710 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
711 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
712end do
713call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
714varMerged
715+0.650807843E-1
716call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
717var(2)
718+0.650807843E-1
719var(0) ! reference
720+0.650807917E-1
721
722
723lb(1) = 1; ub(1) = getUnifRand(2, 7)
724do isam = 2, nsam
725 lb(isam) = ub(isam - 1) + 1
726 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
727end do
728lb
729+1, +4
730ub
731+3, +5
732sample = getUnifRand(0., 1., ub(nsam))
733sample
734+0.733014643, +0.187170565, +0.419325352, +0.972549319, +0.820533156
735rweight = getUnifRand(1., 2., size(sample, 1, IK))
736rweight
737+1.54485798, +1.50408900, +1.86402202, +1.06016314, +1.34950185
738var(0) = getVar(sample, rweight)
739var(0) ! reference
740+0.760395974E-1
741do isam = 1, nsam
742 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
743 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
744end do
745call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
746varMerged
747+0.760395750E-1
748call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
749var(2)
750+0.760395750E-1
751var(0) ! reference
752+0.760395974E-1
753
754
755lb(1) = 1; ub(1) = getUnifRand(2, 7)
756do isam = 2, nsam
757 lb(isam) = ub(isam - 1) + 1
758 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
759end do
760lb
761+1, +3
762ub
763+2, +8
764sample = getUnifRand(0., 1., ub(nsam))
765sample
766+0.238066852, +0.166837215, +0.661685109, +0.861206293, +0.353453755E-1, +0.752181590, +0.468724072, +0.885995328
767rweight = getUnifRand(1., 2., size(sample, 1, IK))
768rweight
769+1.48930311, +1.82184553, +1.98943973, +1.28203726, +1.54431581, +1.55716670, +1.62980449, +1.62581778
770var(0) = getVar(sample, rweight)
771var(0) ! reference
772+0.927250162E-1
773do isam = 1, nsam
774 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
775 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
776end do
777call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
778varMerged
779+0.927250236E-1
780call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
781var(2)
782+0.927250236E-1
783var(0) ! reference
784+0.927250162E-1
785
786
787lb(1) = 1; ub(1) = getUnifRand(2, 7)
788do isam = 2, nsam
789 lb(isam) = ub(isam - 1) + 1
790 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
791end do
792lb
793+1, +6
794ub
795+5, +9
796sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
797sample
798(+0.324733615, -0.643792093), (+0.934649527, -0.501892865), (+0.426089764E-1, -0.164956152), (+0.565551937, -0.711509764), (+0.763955772, -0.401730478), (+0.101779580, -0.632667542E-1), (+0.994905651, -0.239416778), (+0.814852357, -0.180796981E-1), (+0.822745085, -0.126522481)
799rweight = getUnifRand(1., 2., size(sample, 1, IK))
800rweight
801+1.38561666, +1.99288821, +1.58661282, +1.74405050, +1.78095090, +1.19709456, +1.95633221, +1.89307880, +1.41820192
802var(0) = getVar(sample, rweight)
803var(0) ! reference
804+0.164328501
805do isam = 1, nsam
806 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
807 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
808end do
809call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
810varMerged
811+0.164328530
812call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
813var(2)
814+0.164328530
815var(0) ! reference
816+0.164328501
817
818
819lb(1) = 1; ub(1) = getUnifRand(2, 7)
820do isam = 2, nsam
821 lb(isam) = ub(isam - 1) + 1
822 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
823end do
824lb
825+1, +3
826ub
827+2, +5
828sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
829sample
830(+0.186632276E-1, -0.939852417), (+0.307384610, -0.555242300E-1), (+0.789519489, -0.171497285), (+0.744564533E-1, -0.733291566), (+0.315903425, -0.514860153)
831rweight = getUnifRand(1., 2., size(sample, 1, IK))
832rweight
833+1.74016929, +1.89890695, +1.42768335, +1.95435905, +1.58244944
834var(0) = getVar(sample, rweight)
835var(0) ! reference
836+0.179871038
837do isam = 1, nsam
838 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
839 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
840end do
841call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
842varMerged
843+0.179871008
844call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
845var(2)
846+0.179871008
847var(0) ! reference
848+0.179871038
849
850
851lb(1) = 1; ub(1) = getUnifRand(2, 7)
852do isam = 2, nsam
853 lb(isam) = ub(isam - 1) + 1
854 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
855end do
856lb
857+1, +6
858ub
859+5, +9
860sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
861sample
862(+0.336385071, -0.753916562), (+0.237079144, -0.766156137), (+0.116526365, -0.430935204), (+0.151494920, -0.722056627E-1), (+0.776567698, -0.413518429), (+0.822734058, -0.198735714), (+0.112787783, -0.874140084), (+0.967552960, -0.124140978), (+0.198764861, -0.250653386)
863rweight = getUnifRand(1., 2., size(sample, 1, IK))
864rweight
865+1.06848419, +1.59378409, +1.69951868, +1.58017945, +1.43697000, +1.81495214, +1.01557755, +1.89400935, +1.22701609
866var(0) = getVar(sample, rweight)
867var(0) ! reference
868+0.188558429
869do isam = 1, nsam
870 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
871 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
872end do
873call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
874varMerged
875+0.188558444
876call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
877var(2)
878+0.188558444
879var(0) ! reference
880+0.188558429
881
882
883lb(1) = 1; ub(1) = getUnifRand(2, 7)
884do isam = 2, nsam
885 lb(isam) = ub(isam - 1) + 1
886 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
887end do
888lb
889+1, +5
890ub
891+4, +10
892sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
893sample
894(+0.490103006, -0.992539167), (+0.820165336, -0.495785475E-1), (+0.912199318, -0.947733104), (+0.705695570, -0.139014184), (+0.135842681, -0.583381534), (+0.856080592, -0.934242308), (+0.879807949, -0.804374516), (+0.472117186, -0.302672148), (+0.134844184, -0.424851835), (+0.109250546, -0.541932344)
895rweight = getUnifRand(1., 2., size(sample, 1, IK))
896rweight
897+1.54734838, +1.03985119, +1.52907610, +1.78980136, +1.19571400, +1.03049421, +1.53051710, +1.46666074, +1.27604198, +1.23288763
898var(0) = getVar(sample, rweight)
899var(0) ! reference
900+0.199583426
901do isam = 1, nsam
902 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
903 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
904end do
905call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
906varMerged
907+0.199583411
908call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
909var(2)
910+0.199583411
911var(0) ! reference
912+0.199583426
913
914
915lb(1) = 1; ub(1) = getUnifRand(2, 7)
916do isam = 2, nsam
917 lb(isam) = ub(isam - 1) + 1
918 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
919end do
920lb
921+1, +4
922ub
923+3, +9
924sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)
925sample
926(+0.990318954, -0.717832625), (+0.250677884, -0.701438665), (+0.641567647, -0.716443241), (+0.734732926, -0.503185272), (+0.319444716, -0.897990465), (+0.635280550, -0.920374155), (+0.694211006, -0.648329973), (+0.462447226, -0.542614639), (+0.790799260, -0.494841278)
927rweight = getUnifRand(1., 2., size(sample, 1, IK))
928rweight
929+1.84304488, +1.30489135, +1.37864828, +1.45374823, +1.69260526, +1.75929809, +1.02753377, +1.42655325, +1.07312870
930var(0) = getVar(sample, rweight)
931var(0) ! reference
932+0.747188553E-1
933do isam = 1, nsam
934 var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
935 mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
936end do
937call setVarMerged(varMerged, var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
938varMerged
939+0.747188553E-1
940call setVarMerged(var(2), var(1), mean(1) - mean(2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
941var(2)
942+0.747188553E-1
943var(0) ! reference
944+0.747188553E-1
945
946
947!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
948!Compute the biased merged variance of a multivariate sample.
949!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
950
951
952dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
953do isam = 2, nsam
954 lb(isam) = ub(isam - 1) + 1
955 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
956end do
957lb
958+1, +4
959ub
960+3, +10
961ndim = getUnifRand(1, minval(ub - lb + 1, 1))
962call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
963call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
964call setResized(varMerged, ndim)
965sample = getUnifRand(-1., +1., ndim, ub(nsam))
966sample
967-0.747040868, +0.184983134, +0.319824815, -0.741749287, +0.888738751, +0.203012109, +0.668128014, -0.892437696E-1, -0.678420782, +0.386608243
968-0.749043941, -0.968018174, -0.310840130, +0.818054199, -0.934159994, +0.137089252, -0.937269568, -0.511180043, -0.322932482, -0.370916843
969var(:,0) = getVar(sample, dim)
970var(:,0) ! reference
971+0.312432975, +0.281545162
972do isam = 1, nsam
973 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
974 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
975end do
976call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
977varMerged
978+0.312432975, +0.281545192
979call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
980var(:,2)
981+0.312432975, +0.281545192
982var(:,0) ! reference
983+0.312432975, +0.281545162
984
985
986dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
987do isam = 2, nsam
988 lb(isam) = ub(isam - 1) + 1
989 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
990end do
991lb
992+1, +3
993ub
994+2, +9
995ndim = getUnifRand(1, minval(ub - lb + 1, 1))
996call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
997call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
998call setResized(varMerged, ndim)
999sample = getUnifRand(-1., +1., ndim, ub(nsam))
1000sample
1001+0.774053454, +0.517226219, -0.200035214, +0.674174070, +0.855960488, +0.388576865, -0.439667821, -0.846243620, +0.689272642
1002+0.497532248, -0.516058683, +0.768584013, +0.758610725, -0.761629224, -0.919982076, +0.251784086, +0.866416693, -0.585658431
1003var(:,0) = getVar(sample, dim)
1004var(:,0) ! reference
1005+0.331364185, +0.472134858
1006do isam = 1, nsam
1007 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1008 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1009end do
1010call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1011varMerged
1012+0.331364155, +0.472134829
1013call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1014var(:,2)
1015+0.331364155, +0.472134829
1016var(:,0) ! reference
1017+0.331364185, +0.472134858
1018
1019
1020dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1021do isam = 2, nsam
1022 lb(isam) = ub(isam - 1) + 1
1023 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1024end do
1025lb
1026+1, +8
1027ub
1028+7, +11
1029ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1030call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1031call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1032call setResized(varMerged, ndim)
1033sample = getUnifRand(-1., +1., ndim, ub(nsam))
1034sample
1035-0.655283332, -0.417263389, -0.375258684, -0.522981644, -0.169150710, -0.523458242, +0.180017948, +0.808143616, -0.897160411, +0.400498271, -0.801352262
1036var(:,0) = getVar(sample, dim)
1037var(:,0) ! reference
1038+0.255432963
1039do isam = 1, nsam
1040 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1041 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1042end do
1043call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1044varMerged
1045+0.255432993
1046call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1047var(:,2)
1048+0.255432993
1049var(:,0) ! reference
1050+0.255432963
1051
1052
1053dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1054do isam = 2, nsam
1055 lb(isam) = ub(isam - 1) + 1
1056 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1057end do
1058lb
1059+1, +3
1060ub
1061+2, +5
1062ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1063call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1064call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1065call setResized(varMerged, ndim)
1066sample = getUnifRand(-1., +1., ndim, ub(nsam))
1067sample
1068-0.760215163, -0.235954762, +0.614621043, -0.554245949, -0.640670419
1069var(:,0) = getVar(sample, dim)
1070var(:,0) ! reference
1071+0.246391892
1072do isam = 1, nsam
1073 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1074 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1075end do
1076call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1077varMerged
1078+0.246391892
1079call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1080var(:,2)
1081+0.246391892
1082var(:,0) ! reference
1083+0.246391892
1084
1085
1086dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1087do isam = 2, nsam
1088 lb(isam) = ub(isam - 1) + 1
1089 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1090end do
1091lb
1092+1, +6
1093ub
1094+5, +8
1095ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1096call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1097call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1098call setResized(varMerged, ndim)
1099sample = getUnifRand(-1., +1., ndim, ub(nsam))
1100sample
1101+0.995720744, +0.154015422, -0.661979198, -0.330688834, +0.125785828, +0.579044700, -0.399168134, +0.459451795
1102-0.258520007, +0.671213984, +0.118505955E-1, +0.865035057E-1, +0.743696690E-1, -0.719231367, -0.979820848, +0.469710231
1103+0.458573341, -0.561269760, +0.302570224, -0.613593817, +0.885739923, +0.266325474E-1, -0.998665690, +0.548706770
1104var(:,0) = getVar(sample, dim)
1105var(:,0) ! reference
1106+0.272249460, +0.272081912, +0.384589970
1107do isam = 1, nsam
1108 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1109 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1110end do
1111call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1112varMerged
1113+0.272249460, +0.272081971, +0.384589970
1114call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1115var(:,2)
1116+0.272249460, +0.272081971, +0.384589970
1117var(:,0) ! reference
1118+0.272249460, +0.272081912, +0.384589970
1119
1120
1121dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1122do isam = 2, nsam
1123 lb(isam) = ub(isam - 1) + 1
1124 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1125end do
1126lb
1127+1, +5
1128ub
1129+4, +11
1130ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1131call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1132call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1133call setResized(varMerged, ndim)
1134sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1135sample
1136(+0.847376585, +0.527308464), (+0.193336606, +0.702659726), (+0.465160608, +0.994346499), (-0.628493547, -0.625979185), (-0.100667357, -0.237196088), (-0.816522479, +0.932207227), (-0.694280744, +0.812438965), (-0.978209138, -0.321964383), (-0.227293849, -0.496530533), (-0.990755081, +0.703432322), (+0.614801764, +0.353791118)
1137(+0.457793355, +0.954946995), (+0.791866899, +0.737979770), (+0.995467901, -0.511049747), (-0.209529161, +0.945123792), (+0.914466381E-1, +0.313180685), (-0.607841849, +0.366305947), (-0.548435211, +0.502381921), (+0.574619293, -0.198737860), (+0.933414817, -0.342857122), (-0.166059971, +0.301826239), (+0.809371471E-2, -0.366108060)
1138(+0.385149717E-1, -0.161427259E-1), (+0.458302140, -0.461797357), (-0.431391120, -0.826012135), (+0.238484144, -0.253306627E-1), (-0.559910178, -0.942217946), (-0.406925797, +0.704781890), (+0.283155799, +0.240322590), (-0.424452186, -0.938015103), (-0.687953234, +0.975559473), (+0.210010886, +0.277793765), (-0.100216031, -0.655561805)
1139var(:,0) = getVar(sample, dim)
1140var(:,0) ! reference
1141+0.736123860, +0.554830551, +0.542939603
1142do isam = 1, nsam
1143 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1144 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1145end do
1146call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1147varMerged
1148+0.736123919, +0.554830492, +0.542939544
1149call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1150var(:,2)
1151+0.736123919, +0.554830492, +0.542939544
1152var(:,0) ! reference
1153+0.736123860, +0.554830551, +0.542939603
1154
1155
1156dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1157do isam = 2, nsam
1158 lb(isam) = ub(isam - 1) + 1
1159 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1160end do
1161lb
1162+1, +5
1163ub
1164+4, +10
1165ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1166call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1167call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1168call setResized(varMerged, ndim)
1169sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1170sample
1171(-0.645101428, +0.508327842), (+0.582576513, +0.583702326E-1), (-0.873307109, -0.741040349), (+0.808513165, +0.850624084), (+0.350531340, -0.744398832E-1), (-0.996457696, +0.385595322), (-0.814030051, +0.412125826), (-0.501253247, -0.113716006), (-0.711779356, -0.770272255), (+0.123072028, +0.241459727)
1172(-0.746973872, -0.281358719), (+0.149437785, +0.857434630), (-0.513908505, -0.607181311), (-0.525968075, -0.134439468), (-0.265169024, +0.202824354), (-0.104475737, -0.959613323), (-0.712811112, +0.455885530), (-0.974351406, -0.142882228), (-0.303960919, -0.576637983), (+0.855030775, +0.525918126)
1173(+0.512867332, -0.499525666), (-0.946445227, -0.454423070), (-0.414609909E-2, -0.814721465), (-0.965695858, -0.905709982), (+0.582962513, -0.721890926E-1), (-0.727089405, -0.270074844), (-0.576313138, -0.560976624), (+0.242174149, -0.451315045), (+0.758749247E-1, +0.959488153), (-0.499642849, -0.125623465)
1174(-0.299104929, +0.494084358E-1), (+0.905627012E-1, +0.622133017E-1), (-0.473433256, +0.979839563E-1), (+0.380849123, +0.913878441), (+0.684944391, -0.765323162), (+0.955276132, +0.914361000), (-0.899485469, -0.219998479), (+0.416419148, -0.258040071), (-0.841908932, +0.255144119), (+0.190384984, -0.570195436)
1175var(:,0) = getVar(sample, dim)
1176var(:,0) ! reference
1177+0.647244990, +0.545214355, +0.552674592, +0.632698715
1178do isam = 1, nsam
1179 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1180 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1181end do
1182call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1183varMerged
1184+0.647244990, +0.545214415, +0.552674532, +0.632698774
1185call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1186var(:,2)
1187+0.647244990, +0.545214415, +0.552674532, +0.632698774
1188var(:,0) ! reference
1189+0.647244990, +0.545214355, +0.552674592, +0.632698715
1190
1191
1192dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1193do isam = 2, nsam
1194 lb(isam) = ub(isam - 1) + 1
1195 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1196end do
1197lb
1198+1, +5
1199ub
1200+4, +11
1201ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1202call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1203call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1204call setResized(varMerged, ndim)
1205sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1206sample
1207(-0.433671117, +0.328501582), (+0.804442048, -0.961525083), (+0.358194590, +0.139343500), (-0.275802493, -0.572344065E-1), (+0.190587640, -0.797565579), (-0.547389984, +0.743439436), (-0.499856591, +0.137848020), (+0.266693354, +0.609488130), (-0.482833385E-1, -0.381299257E-1), (+0.550818682, -0.139460444), (+0.407369375, -0.941941977)
1208(-0.404388547, +0.986183882), (+0.537659049, +0.243865490), (+0.102959991, -0.343522429), (-0.238212705, +0.455553293), (-0.127443790, +0.946386814), (-0.851487756, +0.912039518), (-0.207095981, +0.985478997), (-0.289263964, -0.397982955), (+0.719049335, +0.964995742), (+0.660733342, +0.691460729), (+0.123214722E-1, +0.377290845)
1209(-0.158852339E-1, -0.116490841), (-0.357854366E-2, +0.354087353E-2), (-0.744749904, +0.858680010E-1), (+0.988959074, -0.219525576), (-0.721958995, -0.421185493E-1), (+0.165338516, +0.660915852), (+0.113741755, +0.415244341), (+0.774439216, +0.866706967), (-0.860102177, +0.444647431), (-0.151759028, -0.853342652), (+0.438607812, -0.769055963)
1210var(:,0) = getVar(sample, dim)
1211var(:,0) ! reference
1212+0.506329536, +0.456908494, +0.597948194
1213do isam = 1, nsam
1214 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1215 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1216end do
1217call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1218varMerged
1219+0.506329536, +0.456908494, +0.597948253
1220call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1221var(:,2)
1222+0.506329536, +0.456908494, +0.597948253
1223var(:,0) ! reference
1224+0.506329536, +0.456908494, +0.597948194
1225
1226
1227dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1228do isam = 2, nsam
1229 lb(isam) = ub(isam - 1) + 1
1230 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1231end do
1232lb
1233+1, +8
1234ub
1235+7, +11
1236ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1237call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1238call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1239call setResized(varMerged, ndim)
1240sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1241sample
1242(+0.215138435, +0.225547552E-1), (+0.669736385, -0.471347809), (-0.417252421, -0.985968947), (-0.664033771, +0.321176410), (-0.682475328, +0.382858872), (-0.460563898, +0.938127756), (-0.206880212, +0.730111718), (+0.274245024, +0.968663216), (-0.796945095, +0.346060276), (-0.105977297, +0.889737129), (+0.801196933, -0.581636071)
1243(-0.186941862, +0.122642040), (-0.493225694, +0.435792446), (+0.538695216, -0.722331524), (-0.844985962, -0.540791869), (+0.573334694E-1, +0.531178713E-1), (+0.182572484, -0.251150608), (+0.322728038, +0.402557969), (-0.946991801, +0.124836445), (+0.382039785, -0.879990458), (+0.250313997, +0.788127661), (-0.136102796, +0.210768580)
1244var(:,0) = getVar(sample, dim)
1245var(:,0) ! reference
1246+0.679292560, +0.470387816
1247do isam = 1, nsam
1248 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1249 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1250end do
1251call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1252varMerged
1253+0.679292560, +0.470387846
1254call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1255var(:,2)
1256+0.679292560, +0.470387846
1257var(:,0) ! reference
1258+0.679292560, +0.470387816
1259
1260
1261dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1262do isam = 2, nsam
1263 lb(isam) = ub(isam - 1) + 1
1264 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1265end do
1266lb
1267+1, +4
1268ub
1269+3, +5
1270ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1271call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1272call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1273call setResized(varMerged, ndim)
1274sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1275sample
1276(+0.899300218, -0.130444884), (-0.189111471, -0.195071936), (-0.625132561, +0.644532442), (-0.832623005, -0.570595026), (-0.961408377, +0.316379070E-1)
1277(-0.113335729, -0.996526599), (-0.509589791, -0.454612970E-1), (+0.117612481, -0.230953217), (+0.969210386, -0.946211815E-1), (-0.696527243, +0.615879416)
1278var(:,0) = getVar(sample, dim)
1279var(:,0) ! reference
1280+0.611227691, +0.604756355
1281do isam = 1, nsam
1282 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)
1283 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)
1284end do
1285call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1286varMerged
1287+0.611227691, +0.604756296
1288call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(ub(1), TKG) / real(ub(2), TKG))
1289var(:,2)
1290+0.611227691, +0.604756296
1291var(:,0) ! reference
1292+0.611227691, +0.604756355
1293
1294
1295!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1296!Compute the biased merged variance of a frequency weighted multivariate sample.
1297!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1298
1299
1300dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1301do isam = 2, nsam
1302 lb(isam) = ub(isam - 1) + 1
1303 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1304end do
1305lb
1306+1, +7
1307ub
1308+6, +8
1309ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1310call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1311call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1312call setResized(varMerged, ndim)
1313sample = getUnifRand(-1., +1., ndim, ub(nsam))
1314sample
1315+0.242505789, +0.574395895, +0.955596447, +0.403521419, -0.549967051, +0.286212325, -0.811249614, -0.674889326
1316iweight = getUnifRand(1, 10, size(sample, dim, IK))
1317iweight
1318+8, +6, +6, +5, +10, +8, +10, +2
1319var(:,0) = getVar(sample, 2_IK, iweight)
1320var(:,0) ! reference
1321+0.362026155
1322do isam = 1, nsam
1323 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1324 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1325end do
1326call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1327varMerged
1328+0.362026215
1329call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1330var(:,2)
1331+0.362026215
1332var(:,0) ! reference
1333+0.362026155
1334
1335
1336dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1337do isam = 2, nsam
1338 lb(isam) = ub(isam - 1) + 1
1339 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1340end do
1341lb
1342+1, +4
1343ub
1344+3, +10
1345ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1346call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1347call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1348call setResized(varMerged, ndim)
1349sample = getUnifRand(-1., +1., ndim, ub(nsam))
1350sample
1351+0.596255302, +0.169465542E-1, +0.569961667, +0.871284723, +0.636877894, +0.794609785E-1, -0.966168642E-1, +0.365449071, +0.533938169, -0.208634496
1352+0.804134130, +0.707110763, -0.787787676, -0.370917320, +0.441209674, +0.486154675, +0.324130177, -0.642628670E-1, +0.593031049, +0.666450977
1353+0.127312541, -0.616318822, -0.552416325, +0.528912187, +0.167778850, +0.692870378, +0.713365316, +0.544094682, -0.678504467, +0.202560902
1354iweight = getUnifRand(1, 10, size(sample, dim, IK))
1355iweight
1356+2, +5, +1, +3, +4, +9, +10, +4, +2, +8
1357var(:,0) = getVar(sample, 2_IK, iweight)
1358var(:,0) ! reference
1359+0.111060522, +0.117203400, +0.219519198
1360do isam = 1, nsam
1361 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1362 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1363end do
1364call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1365varMerged
1366+0.111060515, +0.117203392, +0.219519213
1367call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1368var(:,2)
1369+0.111060515, +0.117203392, +0.219519213
1370var(:,0) ! reference
1371+0.111060522, +0.117203400, +0.219519198
1372
1373
1374dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1375do isam = 2, nsam
1376 lb(isam) = ub(isam - 1) + 1
1377 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1378end do
1379lb
1380+1, +6
1381ub
1382+5, +8
1383ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1384call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1385call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1386call setResized(varMerged, ndim)
1387sample = getUnifRand(-1., +1., ndim, ub(nsam))
1388sample
1389-0.327001333, -0.246211648, -0.893317461, +0.882905602, +0.110421896, -0.305242777, +0.540845394, -0.659483671E-1
1390iweight = getUnifRand(1, 10, size(sample, dim, IK))
1391iweight
1392+10, +3, +4, +6, +10, +6, +9, +6
1393var(:,0) = getVar(sample, 2_IK, iweight)
1394var(:,0) ! reference
1395+0.230010375
1396do isam = 1, nsam
1397 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1398 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1399end do
1400call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1401varMerged
1402+0.230010390
1403call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1404var(:,2)
1405+0.230010390
1406var(:,0) ! reference
1407+0.230010375
1408
1409
1410dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1411do isam = 2, nsam
1412 lb(isam) = ub(isam - 1) + 1
1413 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1414end do
1415lb
1416+1, +3
1417ub
1418+2, +8
1419ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1420call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1421call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1422call setResized(varMerged, ndim)
1423sample = getUnifRand(-1., +1., ndim, ub(nsam))
1424sample
1425+0.530240893, -0.402917862E-1, +0.388667345, -0.445104480, +0.195219040, -0.375459909, +0.188236117, +0.558228254
1426+0.950479507E-2, +0.748793244, +0.808006406, -0.314584255, -0.491146803, -0.296602249, -0.769114256, +0.638747931
1427iweight = getUnifRand(1, 10, size(sample, dim, IK))
1428iweight
1429+8, +8, +10, +5, +1, +3, +1, +5
1430var(:,0) = getVar(sample, 2_IK, iweight)
1431var(:,0) ! reference
1432+0.131669611, +0.246923164
1433do isam = 1, nsam
1434 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1435 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1436end do
1437call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1438varMerged
1439+0.131669596, +0.246923208
1440call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1441var(:,2)
1442+0.131669596, +0.246923208
1443var(:,0) ! reference
1444+0.131669611, +0.246923164
1445
1446
1447dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1448do isam = 2, nsam
1449 lb(isam) = ub(isam - 1) + 1
1450 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1451end do
1452lb
1453+1, +6
1454ub
1455+5, +10
1456ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1457call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1458call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1459call setResized(varMerged, ndim)
1460sample = getUnifRand(-1., +1., ndim, ub(nsam))
1461sample
1462+0.911359668, +0.694456458, -0.563215017E-1, +0.413014531, +0.116318226, -0.661238194, -0.428898335E-1, -0.934223771, +0.912287831, +0.187582016
1463-0.321341276, +0.163095117, -0.100630164, +0.931745768, +0.800638318, -0.545610309, +0.737981915, +0.370585918, -0.853986263, +0.475458264
1464iweight = getUnifRand(1, 10, size(sample, dim, IK))
1465iweight
1466+4, +1, +10, +3, +7, +9, +7, +7, +1, +1
1467var(:,0) = getVar(sample, 2_IK, iweight)
1468var(:,0) ! reference
1469+0.293611377, +0.290245056
1470do isam = 1, nsam
1471 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1472 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1473end do
1474call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1475varMerged
1476+0.293611407, +0.290245056
1477call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1478var(:,2)
1479+0.293611407, +0.290245056
1480var(:,0) ! reference
1481+0.293611377, +0.290245056
1482
1483
1484dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1485do isam = 2, nsam
1486 lb(isam) = ub(isam - 1) + 1
1487 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1488end do
1489lb
1490+1, +5
1491ub
1492+4, +9
1493ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1494call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1495call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1496call setResized(varMerged, ndim)
1497sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1498sample
1499(-0.146284461, +0.867155790E-1), (+0.933442593, +0.423397899), (-0.570520520, +0.225770116), (+0.114498973, -0.658775210), (-0.184664130, +0.252410769), (+0.326699495, +0.136609316), (-0.641482830, -0.865697861), (-0.686421871, +0.896684885), (+0.652308464E-1, +0.547630906)
1500(-0.969345093, -0.756239653), (-0.526829243, -0.877101898), (-0.278087139, +0.879977942E-1), (-0.396531701, +0.233512878), (-0.830881238, -0.607589841), (-0.937448978, +0.607623816), (-0.455369949, -0.711330175E-1), (-0.353791714, +0.381337762), (+0.759497046, -0.245906353)
1501(+0.359263539, +0.533625007), (+0.831247211, +0.821625233), (-0.165602207, +0.406638503), (-0.664138556, +0.886573315), (+0.757350802, +0.214588642E-1), (-0.800492048, +0.751166821), (-0.847876549, -0.297858119), (-0.998458624, -0.656492472), (-0.177804589, -0.119682550)
1502(+0.510638952, +0.317399263), (-0.676749110, +0.844699740), (+0.556646585E-1, +0.940611005), (-0.599220037, -0.214725256), (+0.693070889, -0.340771556), (-0.646065116, +0.677623987), (-0.386391044, -0.936572194), (-0.173416138E-1, -0.240836978), (+0.747990370, -0.324821115)
1503iweight = getUnifRand(1, 10, size(sample, dim, IK))
1504iweight
1505+9, +2, +6, +10, +9, +6, +6, +8, +10
1506var(:,0) = getVar(sample, 2_IK, iweight)
1507var(:,0) ! reference
1508+0.434118003, +0.510856807, +0.640451491, +0.582691312
1509do isam = 1, nsam
1510 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1511 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1512end do
1513call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1514varMerged
1515+0.434118032, +0.510856867, +0.640451491, +0.582691312
1516call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1517var(:,2)
1518+0.434118032, +0.510856867, +0.640451491, +0.582691312
1519var(:,0) ! reference
1520+0.434118003, +0.510856807, +0.640451491, +0.582691312
1521
1522
1523dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1524do isam = 2, nsam
1525 lb(isam) = ub(isam - 1) + 1
1526 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1527end do
1528lb
1529+1, +8
1530ub
1531+7, +12
1532ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1533call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1534call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1535call setResized(varMerged, ndim)
1536sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1537sample
1538(-0.900217533, -0.654906869), (-0.831107974, +0.271414518), (+0.721202374, +0.623734713), (+0.911950111, +0.592819333), (+0.144774437, -0.244798660), (-0.324759722, -0.203873515), (+0.667961121, +0.676430464), (-0.530260205, +0.774614811), (+0.529660583, -0.704689860), (-0.272103906, +0.941966653), (+0.976570129, +0.413986444), (+0.156903505, -0.804773927)
1539(+0.453409791, +0.932254910), (+0.378547192, +0.824469447), (+0.389649987, -0.612320662), (+0.630836487E-1, +0.730969548), (-0.701501608, +0.664678931), (+0.115365982E-1, -0.665333748), (-0.710602880, -0.709865689), (-0.556768179, +0.395169973), (+0.257164240, -0.149444818), (-0.679737091, +0.285194278), (+0.332027078, +0.988868475E-1), (+0.687473655, +0.342863917)
1540(-0.708525419, -0.828580499), (-0.154281020, -0.130135417), (+0.569538116, -0.838077664), (-0.530642271, -0.917608619), (+0.664828300, -0.169658542), (-0.635947824, +0.100287795), (-0.853743315, -0.407076955), (+0.976173639, +0.128753424), (+0.106733441, +0.377555609), (+0.436913848, -0.410504222), (+0.399892688, +0.546041131), (+0.888277292E-1, +0.967070222)
1541iweight = getUnifRand(1, 10, size(sample, dim, IK))
1542iweight
1543+4, +2, +4, +3, +9, +7, +5, +8, +2, +1, +10, +8
1544var(:,0) = getVar(sample, 2_IK, iweight)
1545var(:,0) ! reference
1546+0.698427737, +0.556259513, +0.688864052
1547do isam = 1, nsam
1548 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1549 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1550end do
1551call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1552varMerged
1553+0.698427737, +0.556259513, +0.688863933
1554call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1555var(:,2)
1556+0.698427737, +0.556259513, +0.688863933
1557var(:,0) ! reference
1558+0.698427737, +0.556259513, +0.688864052
1559
1560
1561dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1562do isam = 2, nsam
1563 lb(isam) = ub(isam - 1) + 1
1564 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1565end do
1566lb
1567+1, +6
1568ub
1569+5, +9
1570ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1571call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1572call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1573call setResized(varMerged, ndim)
1574sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1575sample
1576(-0.286536813, -0.146984816), (-0.679449558, +0.101533413), (+0.654498219, -0.507036567), (+0.438608170, -0.342152476), (+0.666899204, -0.211523533), (-0.251023889, +0.634770393), (-0.225903273, +0.728679895), (+0.455668330, +0.374765992), (+0.205272198, -0.810299039)
1577(+0.996517897, +0.375978589), (-0.275680065, +0.291508317), (-0.550969243, -0.566453218), (+0.100435376, -0.330679297), (+0.737785101, -0.207617283), (-0.551276326, -0.743896365), (+0.511547565, -0.265948892), (+0.992117763, +0.906930208), (+0.617987514, -0.313849449E-1)
1578(+0.308698177, +0.848446488), (-0.346206784, +0.317113280), (-0.352071762, -0.765343547), (-0.613536358, +0.449990988), (+0.453776121, -0.319349766E-2), (+0.637853742, +0.331122994), (-0.218294978, -0.370616913), (-0.394185185, +0.553586245), (-0.923420787, +0.970166445)
1579(-0.315308928, -0.977658391), (+0.868724704, -0.965571761), (-0.444422841, +0.685383081E-1), (-0.385201335, -0.501846194), (+0.527614832, -0.428371310), (+0.383374095, -0.768241405), (+0.229072690, -0.544794917), (+0.816616297, +0.611822128), (+0.838663816, -0.939604044E-1)
1580iweight = getUnifRand(1, 10, size(sample, dim, IK))
1581iweight
1582+5, +7, +4, +4, +10, +4, +10, +1, +6
1583var(:,0) = getVar(sample, 2_IK, iweight)
1584var(:,0) ! reference
1585+0.484505922, +0.401285291, +0.503434837, +0.340584785
1586do isam = 1, nsam
1587 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1588 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1589end do
1590call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1591varMerged
1592+0.484505832, +0.401285231, +0.503434837, +0.340584785
1593call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1594var(:,2)
1595+0.484505832, +0.401285231, +0.503434837, +0.340584785
1596var(:,0) ! reference
1597+0.484505922, +0.401285291, +0.503434837, +0.340584785
1598
1599
1600dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1601do isam = 2, nsam
1602 lb(isam) = ub(isam - 1) + 1
1603 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1604end do
1605lb
1606+1, +4
1607ub
1608+3, +10
1609ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1610call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1611call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1612call setResized(varMerged, ndim)
1613sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1614sample
1615(-0.648527145E-1, -0.178361058), (+0.472925544, -0.991317749), (-0.651532888, +0.117256284), (-0.707736373, -0.573486924), (+0.480163693, +0.151333809), (-0.959601521, +0.994352579), (-0.560926199E-1, -0.112807393), (-0.908797741, -0.309110880E-1), (-0.142950058, -0.972068310E-2), (-0.345305800, +0.269237518)
1616iweight = getUnifRand(1, 10, size(sample, dim, IK))
1617iweight
1618+7, +8, +4, +2, +6, +3, +9, +9, +4, +10
1619var(:,0) = getVar(sample, 2_IK, iweight)
1620var(:,0) ! reference
1621+0.434053421
1622do isam = 1, nsam
1623 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1624 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1625end do
1626call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1627varMerged
1628+0.434053451
1629call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1630var(:,2)
1631+0.434053451
1632var(:,0) ! reference
1633+0.434053421
1634
1635
1636dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1637do isam = 2, nsam
1638 lb(isam) = ub(isam - 1) + 1
1639 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1640end do
1641lb
1642+1, +3
1643ub
1644+2, +7
1645ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1646call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1647call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1648call setResized(varMerged, ndim)
1649sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1650sample
1651(+0.229886413, +0.346967697), (+0.415289283, +0.871560693), (+0.672967315, -0.507863879), (-0.442207932, -0.448224068), (+0.828486681, +0.474369526E-2), (-0.219286084, +0.178529859), (+0.668661118, +0.744947433)
1652iweight = getUnifRand(1, 10, size(sample, dim, IK))
1653iweight
1654+7, +1, +9, +8, +10, +9, +5
1655var(:,0) = getVar(sample, 2_IK, iweight)
1656var(:,0) ! reference
1657+0.412001580
1658do isam = 1, nsam
1659 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1660 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))
1661end do
1662call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1663varMerged
1664+0.412001580
1665call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))
1666var(:,2)
1667+0.412001580
1668var(:,0) ! reference
1669+0.412001580
1670
1671
1672!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1673!Compute the biased merged variance of a reliability weighted multivariate sample.
1674!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1675
1676
1677dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1678do isam = 2, nsam
1679 lb(isam) = ub(isam - 1) + 1
1680 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1681end do
1682lb
1683+1, +4
1684ub
1685+3, +7
1686ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1687call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1688call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1689call setResized(varMerged, ndim)
1690sample = getUnifRand(-1., +1., ndim, ub(nsam))
1691sample
1692-0.888557911, +0.329194069, -0.313001394, +0.804808497, +0.919162989, +0.679234028, +0.706688046
1693+0.478785515, +0.996027112, -0.590569377, -0.239705682, +0.288708210E-1, -0.810831666, +0.212860227
1694rweight = getUnifRand(1., 2., size(sample, dim, IK))
1695rweight
1696+1.67114210, +1.14788294, +1.10571098, +1.47795558, +1.42102897, +1.38436651, +1.76140451
1697var(:,0) = getVar(sample, 2_IK, rweight)
1698var(:,0) ! reference
1699+0.419624954, +0.298739433
1700do isam = 1, nsam
1701 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1702 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1703end do
1704call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1705varMerged
1706+0.419624954, +0.298739463
1707call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1708var(:,2)
1709+0.419624954, +0.298739463
1710var(:,0) ! reference
1711+0.419624954, +0.298739433
1712
1713
1714dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1715do isam = 2, nsam
1716 lb(isam) = ub(isam - 1) + 1
1717 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1718end do
1719lb
1720+1, +7
1721ub
1722+6, +10
1723ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1724call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1725call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1726call setResized(varMerged, ndim)
1727sample = getUnifRand(-1., +1., ndim, ub(nsam))
1728sample
1729+0.460425854, -0.920189619, +0.972802520, -0.492216349E-1, +0.148291826, +0.988834381, +0.504449844, -0.176348567, +0.701910973, -0.260791063
1730-0.975033760, -0.902382612, -0.278524399, +0.849086046E-1, +0.836565971, +0.304007530E-1, -0.335596919, +0.332165956, -0.706252694, +0.797214150
1731+0.162320137, -0.662598848, +0.840945005, -0.157815814, -0.845188498, -0.120430112, -0.739760399E-1, +0.414864659, -0.799647689, +0.145586133
1732rweight = getUnifRand(1., 2., size(sample, dim, IK))
1733rweight
1734+1.97860229, +1.55619550, +1.15947247, +1.46720505, +1.21116066, +1.68759596, +1.55261064, +1.63905954, +1.46905708, +1.50945044
1735var(:,0) = getVar(sample, 2_IK, rweight)
1736var(:,0) ! reference
1737+0.326722652, +0.381144643, +0.234984890
1738do isam = 1, nsam
1739 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1740 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1741end do
1742call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1743varMerged
1744+0.326722652, +0.381144613, +0.234984875
1745call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1746var(:,2)
1747+0.326722652, +0.381144613, +0.234984875
1748var(:,0) ! reference
1749+0.326722652, +0.381144643, +0.234984890
1750
1751
1752dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1753do isam = 2, nsam
1754 lb(isam) = ub(isam - 1) + 1
1755 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1756end do
1757lb
1758+1, +5
1759ub
1760+4, +9
1761ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1762call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1763call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1764call setResized(varMerged, ndim)
1765sample = getUnifRand(-1., +1., ndim, ub(nsam))
1766sample
1767-0.683803797, -0.651838183, -0.556571245, -0.635753751, +0.661595345, -0.106280208, -0.547484756, -0.700785756, -0.184131980
1768-0.296554685, -0.161083102, -0.155019641, +0.694434404, -0.292607427, -0.981447101, +0.560917020, -0.371642113E-1, +0.344353080
1769-0.316332459, +0.924007773, -0.764171481, -0.427654028, -0.984238625, -0.819198370, -0.864921570, +0.476350904, +0.378608227
1770rweight = getUnifRand(1., 2., size(sample, dim, IK))
1771rweight
1772+1.28322434, +1.82813156, +1.52295554, +1.01924610, +1.74625921, +1.30955493, +1.57845759, +1.47377157, +1.59101558
1773var(:,0) = getVar(sample, 2_IK, rweight)
1774var(:,0) ! reference
1775+0.195384353, +0.206534103, +0.473823398
1776do isam = 1, nsam
1777 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1778 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1779end do
1780call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1781varMerged
1782+0.195384353, +0.206534132, +0.473823398
1783call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1784var(:,2)
1785+0.195384353, +0.206534132, +0.473823398
1786var(:,0) ! reference
1787+0.195384353, +0.206534103, +0.473823398
1788
1789
1790dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1791do isam = 2, nsam
1792 lb(isam) = ub(isam - 1) + 1
1793 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1794end do
1795lb
1796+1, +5
1797ub
1798+4, +11
1799ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1800call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1801call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1802call setResized(varMerged, ndim)
1803sample = getUnifRand(-1., +1., ndim, ub(nsam))
1804sample
1805-0.202432871E-1, -0.985265017, -0.673863292, +0.942220211, -0.625850320, -0.262372613, +0.214069724, -0.964924693, -0.806390524, -0.317652225E-1, +0.117164016
1806+0.254733682, -0.932766438, +0.761148095, -0.417516470, -0.413452983, +0.194532394, -0.985345364, -0.391406417, +0.197498798E-1, -0.223497152, +0.215343595
1807+0.443462133, -0.705184817, -0.588925362, -0.118726492, +0.424987793, +0.149621964, -0.179820776, +0.492318749, +0.521223664, +0.519991517, +0.317372203
1808rweight = getUnifRand(1., 2., size(sample, dim, IK))
1809rweight
1810+1.44483185, +1.80938625, +1.67023134, +1.94651866, +1.37339306, +1.55754900, +1.31047785, +1.34894347, +1.92358494, +1.92338181, +1.54952002
1811var(:,0) = getVar(sample, 2_IK, rweight)
1812var(:,0) ! reference
1813+0.345842302, +0.247020945, +0.192725420
1814do isam = 1, nsam
1815 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1816 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1817end do
1818call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1819varMerged
1820+0.345842332, +0.247020975, +0.192725420
1821call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1822var(:,2)
1823+0.345842332, +0.247020975, +0.192725420
1824var(:,0) ! reference
1825+0.345842302, +0.247020945, +0.192725420
1826
1827
1828dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1829do isam = 2, nsam
1830 lb(isam) = ub(isam - 1) + 1
1831 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1832end do
1833lb
1834+1, +6
1835ub
1836+5, +11
1837ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1838call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1839call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1840call setResized(varMerged, ndim)
1841sample = getUnifRand(-1., +1., ndim, ub(nsam))
1842sample
1843+0.153377295, +0.320249796, +0.823387146, -0.756801844, +0.580477476, -0.290769815, +0.880780220E-1, +0.272390008, -0.397968411, -0.424304008E-1, -0.213643670
1844+0.604380012, +0.981967449E-1, -0.156500578, +0.313789964, +0.508548260, -0.102337480, +0.811651826, -0.623337746, +0.214986920, -0.306682348, -0.935568333
1845+0.177571177, +0.393253565E-1, -0.988423824E-2, -0.175804257, -0.485821843, +0.771727562, +0.710146785, -0.610245824, +0.807741046, +0.275559068, -0.712241888
1846+0.287861109, -0.449806094, +0.953983307, +0.752425432, -0.972459555, +0.648426294, +0.624544978, -0.929854870, +0.338166714, -0.577121377, -0.663434386
1847-0.207483768E-2, +0.207405329, -0.271470308, +0.361985326, +0.885814309, -0.681919217, +0.347300768, +0.402693868, +0.980070353, -0.722077608, -0.842578053
1848rweight = getUnifRand(1., 2., size(sample, dim, IK))
1849rweight
1850+1.95859838, +1.07996941, +1.93738461, +1.12768149, +1.40929246, +1.55408239, +1.78766489, +1.90975428, +1.89489818, +1.65414166, +1.73646760
1851var(:,0) = getVar(sample, 2_IK, rweight)
1852var(:,0) ! reference
1853+0.175936952, +0.273542017, +0.281474113, +0.478920072, +0.363616377
1854do isam = 1, nsam
1855 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1856 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1857end do
1858call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1859varMerged
1860+0.175936967, +0.273542017, +0.281474054, +0.478920102, +0.363616377
1861call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1862var(:,2)
1863+0.175936967, +0.273542017, +0.281474054, +0.478920102, +0.363616377
1864var(:,0) ! reference
1865+0.175936952, +0.273542017, +0.281474113, +0.478920072, +0.363616377
1866
1867
1868dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1869do isam = 2, nsam
1870 lb(isam) = ub(isam - 1) + 1
1871 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1872end do
1873lb
1874+1, +5
1875ub
1876+4, +8
1877ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1878call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1879call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1880call setResized(varMerged, ndim)
1881sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1882sample
1883(+0.668096185, -0.376930714), (-0.729271531, -0.498067498), (+0.590193510, +0.484832406), (-0.192140579, +0.539550900), (+0.600930333, +0.186349750), (+0.450693011, -0.466864228), (+0.467670560, +0.744129419E-1), (-0.919672728, -0.785013437)
1884(+0.587558389, +0.436258197), (-0.999872804, -0.250632286), (+0.497077703, -0.874444962), (-0.160764217, -0.781627774), (+0.726821065, -0.934643388), (+0.194379449, +0.339420438), (-0.882389069, -0.642035961), (+0.365227103, +0.199026942)
1885(-0.147494793, -0.119437337), (+0.578763485E-1, +0.867274761), (+0.345347285, -0.621222854), (-0.845945716, +0.930509210), (+0.720733643, +0.567002177), (+0.383615494E-1, +0.989295244E-1), (+0.486702323, -0.332923293), (-0.196585178, +0.444395423)
1886rweight = getUnifRand(1., 2., size(sample, dim, IK))
1887rweight
1888+1.77647555, +1.27335858, +1.46744227, +1.60193682, +1.63261092, +1.26411343, +1.37880385, +1.45737004
1889var(:,0) = getVar(sample, 2_IK, rweight)
1890var(:,0) ! reference
1891+0.566034079, +0.666745186, +0.494756848
1892do isam = 1, nsam
1893 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1894 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1895end do
1896call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1897varMerged
1898+0.566034138, +0.666745305, +0.494756788
1899call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1900var(:,2)
1901+0.566034138, +0.666745305, +0.494756788
1902var(:,0) ! reference
1903+0.566034079, +0.666745186, +0.494756848
1904
1905
1906dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1907do isam = 2, nsam
1908 lb(isam) = ub(isam - 1) + 1
1909 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1910end do
1911lb
1912+1, +4
1913ub
1914+3, +7
1915ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1916call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1917call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1918call setResized(varMerged, ndim)
1919sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1920sample
1921(+0.657147408, -0.226485133), (-0.657071471, -0.232448697), (-0.612134933E-1, +0.960559845E-1), (+0.923939109, -0.635023713), (-0.271993876, -0.782868981), (-0.553612828, +0.750161409), (-0.997625589E-1, -0.882305622)
1922(+0.196020007, +0.548285723), (-0.981394649, -0.500859618), (+0.677642822E-1, +0.644701719E-1), (-0.215367317, +0.988784432), (-0.816110611, -0.473549724), (-0.767446876, -0.394864917), (-0.468884230, -0.231078506)
1923rweight = getUnifRand(1., 2., size(sample, dim, IK))
1924rweight
1925+1.53659844, +1.82925892, +1.62649679, +1.89925563, +1.53859055, +1.86565566, +1.77614117
1926var(:,0) = getVar(sample, 2_IK, rweight)
1927var(:,0) ! reference
1928+0.602236569, +0.464483857
1929do isam = 1, nsam
1930 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1931 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1932end do
1933call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1934varMerged
1935+0.602236629, +0.464483827
1936call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1937var(:,2)
1938+0.602236629, +0.464483827
1939var(:,0) ! reference
1940+0.602236569, +0.464483857
1941
1942
1943dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1944do isam = 2, nsam
1945 lb(isam) = ub(isam - 1) + 1
1946 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1947end do
1948lb
1949+1, +4
1950ub
1951+3, +10
1952ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1953call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1954call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1955call setResized(varMerged, ndim)
1956sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1957sample
1958(+0.778321147, -0.197100282), (-0.143875360, +0.591004133), (+0.961125493, +0.439994931), (+0.581849098, +0.602881908E-1), (-0.855640173E-1, -0.894708872), (+0.640397072E-1, -0.664576173), (+0.241519332, -0.332754374), (+0.762217283, +0.480587840), (+0.441778421, +0.921868682), (+0.941792369, -0.327820778E-1)
1959(+0.686656475, -0.304669142E-1), (+0.738889098, -0.102881193E-1), (-0.382808208, -0.818991184), (+0.755319118, +0.194773793), (-0.525426149, +0.768414736E-1), (-0.182302713, -0.735432863), (-0.449130893, +0.671697140), (+0.585019946, -0.876959562), (-0.653737545, -0.704813004), (+0.329761386, -0.468182921)
1960(-0.596987247, -0.816419005), (-0.708704948, -0.570931673), (-0.895267248, +0.983327389), (-0.695322633, +0.524596214), (-0.392526507, +0.475081325), (+0.755068064E-1, +0.558531880), (+0.576929927, -0.514907002), (+0.781572342, -0.622080922), (-0.997310519, +0.104710579), (-0.295728087, -0.124437213)
1961rweight = getUnifRand(1., 2., size(sample, dim, IK))
1962rweight
1963+1.21942878, +1.90979147, +1.46789289, +1.90709186, +1.49705148, +1.91502523, +1.74750781, +1.70419407, +1.21236801, +1.02461672
1964var(:,0) = getVar(sample, 2_IK, rweight)
1965var(:,0) ! reference
1966+0.452571303, +0.567315936, +0.699241340
1967do isam = 1, nsam
1968 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1969 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
1970end do
1971call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1972varMerged
1973+0.452571303, +0.567315876, +0.699241340
1974call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
1975var(:,2)
1976+0.452571303, +0.567315876, +0.699241340
1977var(:,0) ! reference
1978+0.452571303, +0.567315936, +0.699241340
1979
1980
1981dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
1982do isam = 2, nsam
1983 lb(isam) = ub(isam - 1) + 1
1984 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
1985end do
1986lb
1987+1, +3
1988ub
1989+2, +6
1990ndim = getUnifRand(1, minval(ub - lb + 1, 1))
1991call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
1992call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
1993call setResized(varMerged, ndim)
1994sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
1995sample
1996(-0.968583703, -0.354967356), (-0.552671075, +0.596953392), (+0.484291077, -0.891685486E-4), (-0.407666326, +0.827964067), (-0.617699742, -0.295892954), (+0.819483995, +0.417862415)
1997rweight = getUnifRand(1., 2., size(sample, dim, IK))
1998rweight
1999+1.00665271, +1.73645651, +1.19643843, +1.42176461, +1.96026874, +1.57060552
2000var(:,0) = getVar(sample, 2_IK, rweight)
2001var(:,0) ! reference
2002+0.579386055
2003do isam = 1, nsam
2004 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
2005 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
2006end do
2007call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
2008varMerged
2009+0.579386055
2010call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
2011var(:,2)
2012+0.579386055
2013var(:,0) ! reference
2014+0.579386055
2015
2016
2017dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)
2018do isam = 2, nsam
2019 lb(isam) = ub(isam - 1) + 1
2020 ub(isam) = ub(isam - 1) + getUnifRand(2, 7)
2021end do
2022lb
2023+1, +4
2024ub
2025+3, +7
2026ndim = getUnifRand(1, minval(ub - lb + 1, 1))
2027call setRebound(var, [1_IK, 0_IK], [ndim, nsam])
2028call setRebound(mean, [1_IK, 1_IK], [ndim, nsam])
2029call setResized(varMerged, ndim)
2030sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)
2031sample
2032(-0.431583643, +0.692519546), (-0.355872869, +0.782198310), (-0.520240426, +0.899248004), (+0.603245854, -0.316654563), (+0.855769038, +0.777642727E-1), (-0.433209896, -0.426689386E-1), (-0.202613950, -0.380797148)
2033rweight = getUnifRand(1., 2., size(sample, dim, IK))
2034rweight
2035+1.75911653, +1.34599316, +1.78330052, +1.57437873, +1.19153464, +1.68261051, +1.34463930
2036var(:,0) = getVar(sample, 2_IK, rweight)
2037var(:,0) ! reference
2038+0.501432300
2039do isam = 1, nsam
2040 var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
2041 mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))
2042end do
2043call setVarMerged(varMerged, var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
2044varMerged
2045+0.501432300
2046call setVarMerged(var(:,2), var(:,1), mean(:,1) - mean(:,2), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))
2047var(:,2)
2048+0.501432300
2049var(:,0) ! reference
2050+0.501432300
2051
2052
Test:
test_pm_sampleVar


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 8705 of file pm_sampleVar.F90.


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