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
24 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
25 call disp%show(
"!Compute the biased merged variance and mean of a univariate sample.")
26 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
30 real(TKG) :: mean(
0:nsam), meanMerged
31 real(TKG),
allocatable :: sample(:)
32 real(TKG) :: var(
0:nsam), varMerged
35 call disp%show(
"lb(1) = 1; ub(1) = getUnifRand(2, 7)")
38 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
39 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
42 lb(isam)
= ub(isam
- 1)
+ 1
49 call disp%show(
"sample = getUnifRand(0., 1., ub(nsam))")
53 call disp%show(
"mean(0) = getMean(sample)")
55 call disp%show(
"mean(0) ! reference")
57 call disp%show(
"var(0) = getVar(sample)")
62 call disp%show(
" var(isam) = getVar(sample(lb(isam):ub(isam)))")
63 call disp%show(
" mean(isam) = getMean(sample(lb(isam):ub(isam)))")
66 var(isam)
= getVar(sample(lb(isam):ub(isam)))
67 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
69 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(2), mean(2), var(1), mean(1), ub(1) / real(ub(2), TKG))")
70 call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
75 call disp%show(
"call setVarMeanMerged(var(2), mean(2), var(1), mean(1), ub(1) / real(ub(2), TKG))")
76 call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
79 call disp%show(
"mean(0) ! reference")
90 complex(TKG) :: mean(
0:nsam), meanMerged
91 complex(TKG),
allocatable :: sample(:)
92 real(TKG) :: var(
0:nsam), varMerged
95 call disp%show(
"lb(1) = 1; ub(1) = getUnifRand(2, 7)")
98 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
99 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
102 lb(isam)
= ub(isam
- 1)
+ 1
109 call disp%show(
"sample = cmplx(getUnifRand(-1., +1., ub(nsam)), getUnifRand(-1., +1., ub(nsam)), TKG)")
113 call disp%show(
"mean(0) = getMean(sample)")
115 call disp%show(
"mean(0) ! reference")
117 call disp%show(
"var(0) = getVar(sample)")
119 call disp%show(
"var(0) ! reference")
122 call disp%show(
" var(isam) = getVar(sample(lb(isam):ub(isam)))")
123 call disp%show(
" mean(isam) = getMean(sample(lb(isam):ub(isam)))")
126 var(isam)
= getVar(sample(lb(isam):ub(isam)))
127 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
129 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(2), mean(2), var(1), mean(1), ub(1) / real(ub(2), TKG))")
130 call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
135 call disp%show(
"call setVarMeanMerged(var(2), mean(2), var(1), mean(1), ub(1) / real(ub(2), TKG))")
136 call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
139 call disp%show(
"mean(0) ! reference")
143 call disp%show(
"var(0) ! reference")
150 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
151 call disp%show(
"!Compute the biased merged variance and mean of a frequency weighted univariate sample.")
152 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
156 real(TKG) :: mean(
0:nsam), meanMerged
157 real(TKG),
allocatable :: sample(:)
158 real(TKG) :: var(
0:nsam), varMerged
161 call disp%show(
"lb(1) = 1; ub(1) = getUnifRand(2, 7)")
164 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
165 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
168 lb(isam)
= ub(isam
- 1)
+ 1
175 call disp%show(
"sample = getUnifRand(0., 1., ub(nsam))")
179 call disp%show(
"iweight = getUnifRand(1, 10, size(sample, 1, IK))")
183 call disp%show(
"mean(0) = getMean(sample, iweight)")
184 mean(
0)
= getMean(sample, iweight)
185 call disp%show(
"mean(0) ! reference")
187 call disp%show(
"var(0) = getVar(sample, iweight)")
188 var(
0)
= getVar(sample, iweight)
189 call disp%show(
"var(0) ! reference")
192 call disp%show(
" var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
193 call disp%show(
" mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
196 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
197 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
199 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(2), mean(2), var(1), mean(1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
200 call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
205 call disp%show(
"call setVarMeanMerged(var(2), mean(2), var(1), mean(1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
206 call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
209 call disp%show(
"mean(0) ! reference")
213 call disp%show(
"var(0) ! reference")
220 complex(TKG) :: mean(
0:nsam), meanMerged
221 complex(TKG),
allocatable :: sample(:)
222 real(TKG) :: var(
0:nsam), varMerged
225 call disp%show(
"lb(1) = 1; ub(1) = getUnifRand(2, 7)")
228 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
229 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
232 lb(isam)
= ub(isam
- 1)
+ 1
239 call disp%show(
"sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)")
243 call disp%show(
"iweight = getUnifRand(1, 10, size(sample, 1, IK))")
247 call disp%show(
"mean(0) = getMean(sample, iweight)")
248 mean(
0)
= getMean(sample, iweight)
249 call disp%show(
"mean(0) ! reference")
251 call disp%show(
"var(0) = getVar(sample, iweight)")
252 var(
0)
= getVar(sample, iweight)
253 call disp%show(
"var(0) ! reference")
256 call disp%show(
" var(isam) = getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
257 call disp%show(
" mean(isam) = getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))")
260 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
261 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
263 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(2), mean(2), var(1), mean(1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
264 call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
269 call disp%show(
"call setVarMeanMerged(var(2), mean(2), var(1), mean(1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
270 call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
273 call disp%show(
"mean(0) ! reference")
277 call disp%show(
"var(0) ! reference")
284 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
285 call disp%show(
"!Compute the biased merged variance and mean of a reliability weighted univariate sample.")
286 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
290 real(TKG) :: mean(
0:nsam), meanMerged
291 real(TKG),
allocatable :: sample(:)
292 real(TKG),
allocatable :: rweight(:)
293 real(TKG) :: var(
0:nsam), varMerged
296 call disp%show(
"lb(1) = 1; ub(1) = getUnifRand(2, 7)")
299 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
300 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
303 lb(isam)
= ub(isam
- 1)
+ 1
310 call disp%show(
"sample = getUnifRand(0., 1., ub(nsam))")
314 call disp%show(
"rweight = getUnifRand(1., 2., size(sample, 1, IK))")
318 call disp%show(
"mean(0) = getMean(sample, rweight)")
319 mean(
0)
= getMean(sample, rweight)
320 call disp%show(
"mean(0) ! reference")
322 call disp%show(
"var(0) = getVar(sample, rweight)")
323 var(
0)
= getVar(sample, rweight)
324 call disp%show(
"var(0) ! reference")
327 call disp%show(
" var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
328 call disp%show(
" mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
331 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
332 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
334 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(2), mean(2), var(1), mean(1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
335 call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
340 call disp%show(
"call setVarMeanMerged(var(2), mean(2), var(1), mean(1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
341 call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
344 call disp%show(
"mean(0) ! reference")
348 call disp%show(
"var(0) ! reference")
355 complex(TKG) :: mean(
0:nsam), meanMerged
356 complex(TKG),
allocatable :: sample(:)
357 real(TKG),
allocatable :: rweight(:)
358 real(TKG) :: var(
0:nsam), varMerged
361 call disp%show(
"lb(1) = 1; ub(1) = getUnifRand(2, 7)")
364 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
365 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
368 lb(isam)
= ub(isam
- 1)
+ 1
375 call disp%show(
"sample = cmplx(getUnifRand(0., 1., ub(nsam)), -getUnifRand(0., 1., ub(nsam)), TKG)")
379 call disp%show(
"rweight = getUnifRand(1., 2., size(sample, 1, IK))")
383 call disp%show(
"mean(0) = getMean(sample, rweight)")
384 mean(
0)
= getMean(sample, rweight)
385 call disp%show(
"mean(0) ! reference")
387 call disp%show(
"var(0) = getVar(sample, rweight)")
388 var(
0)
= getVar(sample, rweight)
389 call disp%show(
"var(0) ! reference")
392 call disp%show(
" var(isam) = getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
393 call disp%show(
" mean(isam) = getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))")
396 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
397 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
399 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(2), mean(2), var(1), mean(1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
400 call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
405 call disp%show(
"call setVarMeanMerged(var(2), mean(2), var(1), mean(1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
406 call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
409 call disp%show(
"mean(0) ! reference")
413 call disp%show(
"var(0) ! reference")
420 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
421 call disp%show(
"!Compute the biased merged variance and mean of a multivariate sample.")
422 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
426 real(TKG),
allocatable :: sample(:,:)
427 real(TKG),
allocatable :: mean(:,:), meanMerged(:)
428 real(TKG),
allocatable :: var(:,:), varMerged(:)
431 call disp%show(
"dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
434 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
435 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
438 lb(isam)
= ub(isam
- 1)
+ 1
445 call disp%show(
"ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
447 call disp%show(
"call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
448 call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
449 call disp%show(
"call setRebound(mean, [1_IK, 0_IK], [ndim, nsam])")
450 call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
451 call disp%show(
"call setResized(meanMerged, ndim)")
453 call disp%show(
"call setResized(varMerged, ndim)")
455 call disp%show(
"sample = getUnifRand(-1., +1., ndim, ub(nsam))")
459 call disp%show(
"mean(:,0) = getVar(sample, dim)")
460 mean(:,
0)
= getVar(sample, dim)
461 call disp%show(
"mean(:,0) ! reference")
463 call disp%show(
"var(:,0) = getVar(sample, dim)")
464 var(:,
0)
= getVar(sample, dim)
465 call disp%show(
"var(:,0) ! reference")
468 call disp%show(
" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)")
469 call disp%show(
" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)")
472 var(:,isam)
= getVar(sample(:,lb(isam):ub(isam)), dim)
473 mean(:,isam)
= getMean(sample(:,lb(isam):ub(isam)), dim)
475 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(:,2), mean(:,2), var(:,1), mean(:,1), real(ub(1), TKG) / real(ub(2), TKG))")
476 call setVarMeanMerged(varMerged, meanMerged, var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(ub(
1), TKG)
/ real(ub(
2), TKG))
481 call disp%show(
"call setVarMeanMerged(var(:,2), mean(:,2), var(:,1), mean(:,1), real(ub(1), TKG) / real(ub(2), TKG))")
482 call setVarMeanMerged(var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(ub(
1), TKG)
/ real(ub(
2), TKG))
485 call disp%show(
"mean(:,0) ! reference")
489 call disp%show(
"var(:,0) ! reference")
496 complex(TKG),
allocatable :: sample(:,:)
497 complex(TKG),
allocatable :: mean(:,:), meanMerged(:)
498 real(TKG),
allocatable :: var(:,:), varMerged(:)
501 call disp%show(
"dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
504 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
505 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
508 lb(isam)
= ub(isam
- 1)
+ 1
515 call disp%show(
"ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
517 call disp%show(
"call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
518 call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
519 call disp%show(
"call setRebound(mean, [1_IK, 0_IK], [ndim, nsam])")
520 call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
521 call disp%show(
"call setResized(meanMerged, ndim)")
523 call disp%show(
"call setResized(varMerged, ndim)")
525 call disp%show(
"sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), -getUnifRand(-1., +1., ndim, ub(nsam)), TKG)")
529 call disp%show(
"mean(:,0) = getVar(sample, dim)")
530 mean(:,
0)
= getVar(sample, dim)
531 call disp%show(
"mean(:,0) ! reference")
533 call disp%show(
"var(:,0) = getVar(sample, dim)")
534 var(:,
0)
= getVar(sample, dim)
535 call disp%show(
"var(:,0) ! reference")
538 call disp%show(
" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), dim)")
539 call disp%show(
" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), dim)")
542 var(:,isam)
= getVar(sample(:,lb(isam):ub(isam)), dim)
543 mean(:,isam)
= getMean(sample(:,lb(isam):ub(isam)), dim)
545 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(:,2), mean(:,2), var(:,1), mean(:,1), real(ub(1), TKG) / real(ub(2), TKG))")
546 call setVarMeanMerged(varMerged, meanMerged, var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(ub(
1), TKG)
/ real(ub(
2), TKG))
551 call disp%show(
"call setVarMeanMerged(var(:,2), mean(:,2), var(:,1), mean(:,1), real(ub(1), TKG) / real(ub(2), TKG))")
552 call setVarMeanMerged(var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(ub(
1), TKG)
/ real(ub(
2), TKG))
555 call disp%show(
"mean(:,0) ! reference")
559 call disp%show(
"var(:,0) ! reference")
566 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
567 call disp%show(
"!Compute the biased merged variance and mean of a frequency weighted multivariate sample.")
568 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
572 real(TKG),
allocatable :: sample(:,:)
573 real(TKG),
allocatable :: mean(:,:), meanMerged(:)
574 real(TKG),
allocatable :: var(:,:), varMerged(:)
577 call disp%show(
"dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
580 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
581 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
584 lb(isam)
= ub(isam
- 1)
+ 1
591 call disp%show(
"ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
593 call disp%show(
"call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
594 call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
595 call disp%show(
"call setRebound(mean, [1_IK, 0_IK], [ndim, nsam])")
596 call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
597 call disp%show(
"call setResized(meanMerged, ndim)")
599 call disp%show(
"call setResized(varMerged, ndim)")
601 call disp%show(
"sample = getUnifRand(-1., +1., ndim, ub(nsam))")
605 call disp%show(
"iweight = getUnifRand(1, 10, size(sample, dim, IK))")
609 call disp%show(
"mean(:,0) = getVar(sample, 2_IK, iweight)")
610 mean(:,
0)
= getVar(sample,
2_IK, iweight)
611 call disp%show(
"mean(:,0) ! reference")
613 call disp%show(
"var(:,0) = getVar(sample, 2_IK, iweight)")
614 var(:,
0)
= getVar(sample,
2_IK, iweight)
615 call disp%show(
"var(:,0) ! reference")
618 call disp%show(
" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
619 call disp%show(
" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
622 var(:,isam)
= getVar(sample(:,lb(isam):ub(isam)),
2_IK, iweight(lb(isam):ub(isam)))
623 mean(:,isam)
= getMean(sample(:,lb(isam):ub(isam)),
2_IK, iweight(lb(isam):ub(isam)))
625 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
626 call setVarMeanMerged(varMerged, meanMerged, var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
631 call disp%show(
"call setVarMeanMerged(var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
632 call setVarMeanMerged(var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
635 call disp%show(
"mean(:,0) ! reference")
639 call disp%show(
"var(:,0) ! reference")
646 complex(TKG),
allocatable :: sample(:,:)
647 complex(TKG),
allocatable :: mean(:,:), meanMerged(:)
648 real(TKG),
allocatable :: var(:,:), varMerged(:)
651 call disp%show(
"dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
654 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
655 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
658 lb(isam)
= ub(isam
- 1)
+ 1
665 call disp%show(
"ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
667 call disp%show(
"call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
668 call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
669 call disp%show(
"call setRebound(mean, [1_IK, 0_IK], [ndim, nsam])")
670 call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
671 call disp%show(
"call setResized(meanMerged, ndim)")
673 call disp%show(
"call setResized(varMerged, ndim)")
675 call disp%show(
"sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)")
679 call disp%show(
"iweight = getUnifRand(1, 10, size(sample, dim, IK))")
683 call disp%show(
"mean(:,0) = getVar(sample, 2_IK, iweight)")
684 mean(:,
0)
= getVar(sample,
2_IK, iweight)
685 call disp%show(
"mean(:,0) ! reference")
687 call disp%show(
"var(:,0) = getVar(sample, 2_IK, iweight)")
688 var(:,
0)
= getVar(sample,
2_IK, iweight)
689 call disp%show(
"var(:,0) ! reference")
692 call disp%show(
" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
693 call disp%show(
" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, iweight(lb(isam):ub(isam)))")
696 var(:,isam)
= getVar(sample(:,lb(isam):ub(isam)),
2_IK, iweight(lb(isam):ub(isam)))
697 mean(:,isam)
= getMean(sample(:,lb(isam):ub(isam)),
2_IK, iweight(lb(isam):ub(isam)))
699 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
700 call setVarMeanMerged(varMerged, meanMerged, var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
705 call disp%show(
"call setVarMeanMerged(var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(iweight(:ub(1))), TKG) / real(sum(iweight), TKG))")
706 call setVarMeanMerged(var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
709 call disp%show(
"mean(:,0) ! reference")
713 call disp%show(
"var(:,0) ! reference")
720 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
721 call disp%show(
"!Compute the biased merged variance and mean of a reliability weighted multivariate sample.")
722 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
726 real(TKG),
allocatable :: sample(:,:)
727 real(TKG),
allocatable :: mean(:,:), meanMerged(:)
728 real(TKG),
allocatable :: var(:,:), varMerged(:)
729 real(TKG),
allocatable :: rweight(:)
732 call disp%show(
"dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
735 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
736 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
739 lb(isam)
= ub(isam
- 1)
+ 1
746 call disp%show(
"ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
748 call disp%show(
"call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
749 call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
750 call disp%show(
"call setRebound(mean, [1_IK, 0_IK], [ndim, nsam])")
751 call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
752 call disp%show(
"call setResized(meanMerged, ndim)")
754 call disp%show(
"call setResized(varMerged, ndim)")
756 call disp%show(
"sample = getUnifRand(-1., +1., ndim, ub(nsam))")
760 call disp%show(
"rweight = getUnifRand(1., 2., size(sample, dim, IK))")
764 call disp%show(
"mean(:,0) = getVar(sample, 2_IK, rweight)")
765 mean(:,
0)
= getVar(sample,
2_IK, rweight)
766 call disp%show(
"mean(:,0) ! reference")
768 call disp%show(
"var(:,0) = getVar(sample, 2_IK, rweight)")
769 var(:,
0)
= getVar(sample,
2_IK, rweight)
770 call disp%show(
"var(:,0) ! reference")
773 call disp%show(
" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
774 call disp%show(
" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
777 var(:,isam)
= getVar(sample(:,lb(isam):ub(isam)),
2_IK, rweight(lb(isam):ub(isam)))
778 mean(:,isam)
= getMean(sample(:,lb(isam):ub(isam)),
2_IK, rweight(lb(isam):ub(isam)))
780 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
781 call setVarMeanMerged(varMerged, meanMerged, var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
786 call disp%show(
"call setVarMeanMerged(var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
787 call setVarMeanMerged(var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
790 call disp%show(
"mean(:,0) ! reference")
794 call disp%show(
"var(:,0) ! reference")
801 complex(TKG),
allocatable :: sample(:,:)
802 complex(TKG),
allocatable :: mean(:,:), meanMerged(:)
803 real(TKG),
allocatable :: var(:,:), varMerged(:)
804 real(TKG),
allocatable :: rweight(:)
807 call disp%show(
"dim = 2; lb(1) = 1; ub(1) = getUnifRand(2, 7)")
810 call disp%show(
" lb(isam) = ub(isam - 1) + 1")
811 call disp%show(
" ub(isam) = ub(isam - 1) + getUnifRand(2, 7)")
814 lb(isam)
= ub(isam
- 1)
+ 1
821 call disp%show(
"ndim = getUnifRand(1, minval(ub - lb + 1, 1))")
823 call disp%show(
"call setRebound(var, [1_IK, 0_IK], [ndim, nsam])")
824 call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
825 call disp%show(
"call setRebound(mean, [1_IK, 0_IK], [ndim, nsam])")
826 call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
827 call disp%show(
"call setResized(meanMerged, ndim)")
829 call disp%show(
"call setResized(varMerged, ndim)")
831 call disp%show(
"sample = cmplx(getUnifRand(-1., +1., ndim, ub(nsam)), getUnifRand(-1., +1., ndim, ub(nsam)), TKG)")
835 call disp%show(
"rweight = getUnifRand(1., 2., size(sample, dim, IK))")
839 call disp%show(
"mean(:,0) = getVar(sample, 2_IK, rweight)")
840 mean(:,
0)
= getVar(sample,
2_IK, rweight)
841 call disp%show(
"mean(:,0) ! reference")
843 call disp%show(
"var(:,0) = getVar(sample, 2_IK, rweight)")
844 var(:,
0)
= getVar(sample,
2_IK, rweight)
845 call disp%show(
"var(:,0) ! reference")
848 call disp%show(
" var(:,isam) = getVar(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
849 call disp%show(
" mean(:,isam) = getMean(sample(:,lb(isam):ub(isam)), 2_IK, rweight(lb(isam):ub(isam)))")
852 var(:,isam)
= getVar(sample(:,lb(isam):ub(isam)),
2_IK, rweight(lb(isam):ub(isam)))
853 mean(:,isam)
= getMean(sample(:,lb(isam):ub(isam)),
2_IK, rweight(lb(isam):ub(isam)))
855 call disp%show(
"call setVarMeanMerged(varMerged, meanMerged, var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
856 call setVarMeanMerged(varMerged, meanMerged, var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
861 call disp%show(
"call setVarMeanMerged(var(:,2), mean(:,2), var(:,1), mean(:,1), real(sum(rweight(:ub(1))), TKG) / real(sum(rweight), TKG))")
862 call setVarMeanMerged(var(:,
2), mean(:,
2), var(:,
1), mean(:,
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
865 call disp%show(
"mean(:,0) ! reference")
869 call disp%show(
"var(:,0) ! reference")
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.
This is a generic method of the derived type display_type with pass attribute.
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...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
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.
9 lb(isam)
= ub(isam
- 1)
+ 1
18+0.300738692,
+0.826546073,
+0.904453993,
+0.388791502,
+0.707582772,
+0.952494144
26 var(isam)
= getVar(sample(lb(isam):ub(isam)))
27 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
29call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
34call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
47 lb(isam)
= ub(isam
- 1)
+ 1
56+0.451598644,
+0.816199720,
+0.182628632E-3,
+0.347925842
64 var(isam)
= getVar(sample(lb(isam):ub(isam)))
65 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
67call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
72call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
85 lb(isam)
= ub(isam
- 1)
+ 1
94+0.912773132,
+0.402607918,
+0.374722421,
+0.778887272E-1,
+0.958424330,
+0.178530216,
+0.515347719
102 var(isam)
= getVar(sample(lb(isam):ub(isam)))
103 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
105call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
110call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
123 lb(isam)
= ub(isam
- 1)
+ 1
132+0.579243839,
+0.365756810,
+0.975298882,
+0.150066078,
+0.794467330E-1,
+0.588669062,
+0.288138032,
+0.895552337,
+0.190088153,
+0.616138697,
+0.854666471,
+0.493799806
140 var(isam)
= getVar(sample(lb(isam):ub(isam)))
141 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
143call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
148call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
161 lb(isam)
= ub(isam
- 1)
+ 1
170+0.444651842E-1,
+0.178797841E-1,
+0.486887693E-1,
+0.292090833,
+0.113872349,
+0.828850269,
+0.783131242,
+0.673079848,
+0.489113569,
+0.925929666,
+0.946931660
178 var(isam)
= getVar(sample(lb(isam):ub(isam)))
179 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
181call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
186call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
199 lb(isam)
= ub(isam
- 1)
+ 1
208(
+0.801158905,
+0.962853432E-3), (
+0.210760355,
+0.602453232), (
-0.984127879,
+0.956022024), (
+0.110168099,
-0.636793494), (
-0.704571128,
-0.118475676), (
-0.509290576,
-0.652885079), (
-0.427154779,
+0.631077290E-1), (
-0.708558559E-1,
+0.205811262E-1), (
-0.694830179,
-0.457609057), (
+0.292301059,
-0.659750700E-1), (
-0.781919956,
+0.835206509), (
+0.727935791,
-0.540279627)
211(
-0.169202164,
+0.526289165E-3)
216 var(isam)
= getVar(sample(lb(isam):ub(isam)))
217 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
219call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
221(
-0.169202179,
+0.526289456E-3)
224call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
226(
-0.169202179,
+0.526289456E-3)
228(
-0.169202164,
+0.526289165E-3)
237 lb(isam)
= ub(isam
- 1)
+ 1
246(
+0.529052019,
-0.868605375E-1), (
-0.493851066,
-0.366667509E-1), (
-0.260193944,
+0.392078161), (
-0.200027227E-1,
+0.929609656), (
-0.612545013,
+0.222085357), (
-0.443601847,
+0.670454979), (
-0.545647740,
+0.533435345), (
-0.352996111,
-0.934483647)
249(
-0.274973303,
+0.211206570)
254 var(isam)
= getVar(sample(lb(isam):ub(isam)))
255 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
257call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
259(
-0.274973303,
+0.211206570)
262call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
264(
-0.274973303,
+0.211206570)
266(
-0.274973303,
+0.211206570)
275 lb(isam)
= ub(isam
- 1)
+ 1
284(
-0.806439161,
-0.688816190), (
+0.126288772,
+0.262729406), (
-0.130549192,
-0.820411921), (
+0.512068272E-1,
+0.401137114), (
+0.659992576,
+0.424023509), (
+0.516079664,
+0.233240485), (
-0.906788826,
+0.970872045), (
-0.495441437,
-0.576867700)
287(
-0.123206347,
+0.257383436E-1)
292 var(isam)
= getVar(sample(lb(isam):ub(isam)))
293 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
295call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
297(
-0.123206347,
+0.257383436E-1)
300call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
302(
-0.123206347,
+0.257383436E-1)
304(
-0.123206347,
+0.257383436E-1)
313 lb(isam)
= ub(isam
- 1)
+ 1
322(
+0.540003300,
+0.109041452), (
-0.367841721E-1,
+0.277980685), (
+0.877188444,
-0.245737076), (
-0.336740017,
-0.323849559), (
-0.850127816,
-0.184817672), (
+0.687840700,
-0.316632271), (
+0.957695961,
-0.303204417), (
-0.897617340E-1,
-0.770005941), (
-0.925921321,
-0.153110504), (
+0.934314966,
-0.251621485), (
-0.526561618,
-0.843809247), (
+0.247843266E-1,
-0.198450327)
325(
+0.104660921,
-0.267018020)
330 var(isam)
= getVar(sample(lb(isam):ub(isam)))
331 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
333call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
335(
+0.104660928,
-0.267018050)
338call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
340(
+0.104660928,
-0.267018050)
342(
+0.104660921,
-0.267018020)
351 lb(isam)
= ub(isam
- 1)
+ 1
360(
-0.469204903,
-0.226135015), (
-0.386271119,
+0.397879481), (
-0.199822664,
-0.411331773), (
+0.356772304,
+0.825235963), (
+0.310785055,
-0.351433516), (
-0.238024712,
-0.188817978), (
-0.478876948,
-0.407534361), (
-0.495306730,
-0.966156840), (
-0.424324989,
+0.835064173), (
+0.737160206,
-0.971837282), (
-0.949585438,
+0.102951050)
363(
-0.203336373,
-0.123828739)
368 var(isam)
= getVar(sample(lb(isam):ub(isam)))
369 mean(isam)
= getMean(sample(lb(isam):ub(isam)))
371call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
373(
-0.203336358,
-0.123828739)
376call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1), ub(
1)
/ real(ub(
2), TKG))
378(
-0.203336358,
-0.123828739)
380(
-0.203336373,
-0.123828739)
394 lb(isam)
= ub(isam
- 1)
+ 1
403+0.701505542E-1,
+0.508313477,
+0.663662851,
+0.766035795,
+0.129113495,
+0.488194823E-1,
+0.533005714,
+0.840995431,
+0.714910030E-1,
+0.621918678
406+6,
+6,
+7,
+10,
+9,
+3,
+9,
+7,
+10,
+6
407mean(
0)
= getMean(sample, iweight)
410var(
0)
= getVar(sample, iweight)
414 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
415 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
417call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
422call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
435 lb(isam)
= ub(isam
- 1)
+ 1
444+0.596907258,
+0.626886666,
+0.858889878,
+0.510622203,
+0.609003961,
+0.780717015
447+8,
+5,
+9,
+1,
+7,
+4
448mean(
0)
= getMean(sample, iweight)
451var(
0)
= getVar(sample, iweight)
455 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
456 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
458call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
463call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
476 lb(isam)
= ub(isam
- 1)
+ 1
485+0.335113466,
+0.973845780,
+0.818820000E-1,
+0.996913373,
+0.634366870,
+0.131615400E-1,
+0.471685588
488+5,
+4,
+1,
+6,
+2,
+5,
+5
489mean(
0)
= getMean(sample, iweight)
492var(
0)
= getVar(sample, iweight)
496 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
497 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
499call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
504call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
517 lb(isam)
= ub(isam
- 1)
+ 1
526+0.422895610,
+0.638454258,
+0.829345107,
+0.559985995,
+0.598645210E-1,
+0.914627314E-2,
+0.829150975,
+0.150096893,
+0.981886268,
+0.852020204,
+0.153485954
529+4,
+6,
+4,
+8,
+2,
+9,
+1,
+2,
+5,
+7,
+4
530mean(
0)
= getMean(sample, iweight)
533var(
0)
= getVar(sample, iweight)
537 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
538 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
540call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
545call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
558 lb(isam)
= ub(isam
- 1)
+ 1
567+0.173784912,
+0.158469498,
+0.739210546,
+0.495084107,
+0.337988734E-1
571mean(
0)
= getMean(sample, iweight)
574var(
0)
= getVar(sample, iweight)
578 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
579 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
581call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
586call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
599 lb(isam)
= ub(isam
- 1)
+ 1
608(
+0.558308482,
-0.966540754), (
+0.431492269,
-0.113531291), (
+0.833939731,
-0.940448761), (
+0.305300236,
-0.650056243), (
+0.320975304,
-0.355702698), (
+0.492913067,
-0.250933945), (
+0.995503962,
-0.222379148), (
+0.487275422,
-0.607189894), (
+0.863998532,
-0.644135475E-1)
611+6,
+3,
+4,
+1,
+2,
+6,
+1,
+1,
+2
612mean(
0)
= getMean(sample, iweight)
614(
+0.580599725,
-0.527965188)
615var(
0)
= getVar(sample, iweight)
619 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
620 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
622call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
624(
+0.580599666,
-0.527965188)
627call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
629(
+0.580599666,
-0.527965188)
631(
+0.580599725,
-0.527965188)
640 lb(isam)
= ub(isam
- 1)
+ 1
649(
+0.358182371,
-0.448367715), (
+0.775513649,
-0.144074440), (
+0.779866338,
-0.909540296), (
+0.611526370E-1,
-0.319255292), (
+0.598419309E-1,
-0.532354891), (
+0.359419882,
-0.894570708)
652+10,
+1,
+3,
+6,
+2,
+2
653mean(
0)
= getMean(sample, iweight)
655(
+0.329265654,
-0.505239785)
656var(
0)
= getVar(sample, iweight)
660 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
661 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
663call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
665(
+0.329265654,
-0.505239785)
668call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
670(
+0.329265654,
-0.505239785)
672(
+0.329265654,
-0.505239785)
681 lb(isam)
= ub(isam
- 1)
+ 1
690(
+0.711909115,
-0.841032982), (
+0.269236028,
-0.573951840), (
+0.687201858,
-0.726742506), (
+0.318318903,
-0.564504802), (
+0.490798354E-1,
-0.957034111), (
+0.461083829,
-0.359048188), (
+0.902928472,
-0.827983439), (
+0.382648230,
-0.613879204)
693+7,
+6,
+7,
+8,
+8,
+4,
+10,
+9
694mean(
0)
= getMean(sample, iweight)
696(
+0.485861659,
-0.709006667)
697var(
0)
= getVar(sample, iweight)
701 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
702 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
704call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
706(
+0.485861659,
-0.709006667)
709call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
711(
+0.485861659,
-0.709006667)
713(
+0.485861659,
-0.709006667)
722 lb(isam)
= ub(isam
- 1)
+ 1
731(
+0.987938046E-1,
-0.979642093), (
+0.266931891,
-0.334516943), (
+0.602450013,
-0.584214926E-2), (
+0.656891644,
-0.182013988), (
+0.396838129,
-0.253311217), (
+0.639068127,
-0.202912629), (
+0.478952527E-1,
-0.126890540), (
+0.652961493,
-0.565283179), (
+0.987951398,
-0.313381433), (
+0.266513228,
-0.516300797), (
+0.464500844,
-0.696025372)
734+9,
+4,
+1,
+8,
+4,
+2,
+3,
+5,
+4,
+10,
+4
735mean(
0)
= getMean(sample, iweight)
737(
+0.417840362,
-0.471177638)
738var(
0)
= getVar(sample, iweight)
742 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
743 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
745call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
747(
+0.417840362,
-0.471177667)
750call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
752(
+0.417840362,
-0.471177667)
754(
+0.417840362,
-0.471177638)
763 lb(isam)
= ub(isam
- 1)
+ 1
772(
+0.255483687,
-0.863725185), (
+0.252958536E-1,
-0.131093144), (
+0.827879131,
-0.233905315E-1), (
+0.141663313,
-0.838022411), (
+0.123178959E-1,
-0.273090243), (
+0.521687031,
-0.840979874), (
+0.168640614,
-0.666367531)
775+4,
+6,
+10,
+3,
+8,
+6,
+1
776mean(
0)
= getMean(sample, iweight)
778(
+0.349336773,
-0.391747385)
779var(
0)
= getVar(sample, iweight)
783 var(isam)
= getVar(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
784 mean(isam)
= getMean(sample(lb(isam):ub(isam)), iweight(lb(isam):ub(isam)))
786call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
788(
+0.349336773,
-0.391747385)
791call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(iweight(:ub(
1))), TKG)
/ real(
sum(iweight), TKG))
793(
+0.349336773,
-0.391747385)
795(
+0.349336773,
-0.391747385)
809 lb(isam)
= ub(isam
- 1)
+ 1
818+0.132835269,
+0.871566176,
+0.775098443,
+0.907114089,
+0.543647945,
+0.767972767,
+0.747309387,
+0.377118051,
+0.887677670,
+0.682251513,
+0.542521238,
+0.744446516E-1,
+0.393683314,
+0.756820977
821+1.22699714,
+1.18399847,
+1.77490568,
+1.27476716,
+1.69784927,
+1.09041381,
+1.34542489,
+1.66541398,
+1.75653911,
+1.59754062,
+1.79350400,
+1.21765828,
+1.75040889,
+1.15708590
822mean(
0)
= getMean(sample, rweight)
825var(
0)
= getVar(sample, rweight)
829 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
830 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
832call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
837call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
850 lb(isam)
= ub(isam
- 1)
+ 1
859+0.385523200,
+0.151785374,
+0.892585039,
+0.805965960,
+0.524945855,
+0.951787770,
+0.701613188,
+0.747123420,
+0.696798205,
+0.673267841E-1,
+0.535488605,
+0.402875066
862+1.49040484,
+1.00088000,
+1.05744600,
+1.19077814,
+1.57509434,
+1.39221954,
+1.51680493,
+1.29833269,
+1.62845206,
+1.46337569,
+1.35242033,
+1.58305430
863mean(
0)
= getMean(sample, rweight)
866var(
0)
= getVar(sample, rweight)
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)))
873call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
878call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
891 lb(isam)
= ub(isam
- 1)
+ 1
900+0.396233797E-2,
+0.786422789,
+0.471328497E-1,
+0.602182388,
+0.485928059,
+0.486149132,
+0.131243944,
+0.834346592
903+1.84344220,
+1.58568430,
+1.44832397,
+1.95216489,
+1.72541952,
+1.59418809,
+1.16701436,
+1.19981599
904mean(
0)
= getMean(sample, rweight)
907var(
0)
= getVar(sample, rweight)
911 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
912 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
914call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
919call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
932 lb(isam)
= ub(isam
- 1)
+ 1
941+0.205258787,
+0.893208385E-1,
+0.946596920,
+0.893974543,
+0.386933804,
+0.815021157,
+0.759558976,
+0.529469252,
+0.297594368,
+0.870348871
944+1.13571191,
+1.66045403,
+1.64836907,
+1.13851058,
+1.44940674,
+1.60287857,
+1.35368907,
+1.59423661,
+1.40005064,
+1.72472763
945mean(
0)
= getMean(sample, rweight)
948var(
0)
= getVar(sample, rweight)
952 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
953 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
955call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
960call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
973 lb(isam)
= ub(isam
- 1)
+ 1
982+0.505931675,
+0.527020872,
+0.486540020,
+0.537758350,
+0.387741745,
+0.720295787,
+0.962912679
985+1.53134251,
+1.26934409,
+1.86794567,
+1.85778236,
+1.29841423,
+1.20967221,
+1.44157910
986mean(
0)
= getMean(sample, rweight)
989var(
0)
= getVar(sample, rweight)
993 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
994 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
996call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1001call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1014 lb(isam)
= ub(isam
- 1)
+ 1
1023(
+0.145176530,
-0.660803080), (
+0.692834854E-1,
-0.524664700), (
+0.921244144,
-0.426119447), (
+0.899475634,
-0.535263300), (
+0.473420918,
-0.416758120), (
+0.604838371,
-0.511714697), (
+0.342711806E-1,
-0.805644035), (
+0.487457275,
-0.203567863), (
+0.541109562,
-0.115936935)
1026+1.60351181,
+1.49233472,
+1.12591147,
+1.94855857,
+1.01515245,
+1.90431690,
+1.26000714,
+1.62076271,
+1.59752035
1027mean(
0)
= getMean(sample, rweight)
1029(
+0.475835502,
-0.463820279)
1030var(
0)
= getVar(sample, rweight)
1034 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1035 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1037call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1039(
+0.475835532,
-0.463820308)
1042call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1044(
+0.475835532,
-0.463820308)
1046(
+0.475835502,
-0.463820279)
1055 lb(isam)
= ub(isam
- 1)
+ 1
1064(
+0.241394639E-1,
-0.748961091), (
+0.253201246,
-0.899627328), (
+0.212384999,
-0.271962345), (
+0.300542712E-1,
-0.374002814), (
+0.996819735,
-0.791645885), (
+0.634574950,
-0.480429113), (
+0.174930692,
-0.407218218), (
+0.213004172,
-0.684497714), (
+0.827396333,
-0.463329673)
1067+1.38830280,
+1.45451522,
+1.05288303,
+1.00300562,
+1.94611835,
+1.98834896,
+1.67692256,
+1.29554772,
+1.89863777
1068mean(
0)
= getMean(sample, rweight)
1070(
+0.437634945,
-0.580478609)
1071var(
0)
= getVar(sample, rweight)
1075 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1076 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1078call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1080(
+0.437634945,
-0.580478609)
1083call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1085(
+0.437634945,
-0.580478609)
1087(
+0.437634945,
-0.580478609)
1096 lb(isam)
= ub(isam
- 1)
+ 1
1105(
+0.249018967,
-0.886792243), (
+0.673844218,
-0.468544424), (
+0.427544892,
-0.629629791), (
+0.420058727,
-0.593061984)
1108+1.14002752,
+1.65599191,
+1.93492341,
+1.00124562
1109mean(
0)
= getMean(sample, rweight)
1111(
+0.461886048,
-0.627850950)
1112var(
0)
= getVar(sample, rweight)
1116 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1117 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1119call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1121(
+0.461885989,
-0.627850771)
1124call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1126(
+0.461885989,
-0.627850771)
1128(
+0.461886048,
-0.627850950)
1137 lb(isam)
= ub(isam
- 1)
+ 1
1146(
+0.250425339,
-0.129961252), (
+0.458485603,
-0.416625142), (
+0.632188916E-1,
-0.594669700), (
+0.932048678,
-0.610012352), (
+0.471760213,
-0.339183271)
1149+1.15344775,
+1.08451664,
+1.01332998,
+1.51756334,
+1.98186207
1150mean(
0)
= getMean(sample, rweight)
1152(
+0.473957717,
-0.415108919)
1153var(
0)
= getVar(sample, rweight)
1157 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1158 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1160call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1162(
+0.473957747,
-0.415108919)
1165call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1167(
+0.473957747,
-0.415108919)
1169(
+0.473957717,
-0.415108919)
1178 lb(isam)
= ub(isam
- 1)
+ 1
1187(
+0.696598232,
-0.151467144), (
+0.351984441,
-0.814055145), (
+0.195879579,
-0.724640489E-1), (
+0.489833176,
-0.436737955), (
+0.415061951,
-0.887042761), (
+0.775786877,
-0.510850668), (
+0.603616834E-1,
-0.516502917), (
+0.781464994,
-0.820315003), (
+0.767220140,
-0.678626120), (
+0.124815583,
-0.825029254), (
+0.707865298,
-0.177748680)
1190+1.26175809,
+1.50726783,
+1.10619044,
+1.21604908,
+1.07151687,
+1.50455964,
+1.44589996,
+1.75267696,
+1.71240234,
+1.86201596,
+1.35395122
1191mean(
0)
= getMean(sample, rweight)
1193(
+0.493553340,
-0.561720431)
1194var(
0)
= getVar(sample, rweight)
1198 var(isam)
= getVar(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1199 mean(isam)
= getMean(sample(lb(isam):ub(isam)), rweight(lb(isam):ub(isam)))
1201call setVarMeanMerged(varMerged, meanMerged, var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1203(
+0.493553370,
-0.561720490)
1206call setVarMeanMerged(var(
2), mean(
2), var(
1), mean(
1),
real(
sum(rweight(:ub(
1))), TKG)
/ real(
sum(rweight), TKG))
1208(
+0.493553370,
-0.561720490)
1210(
+0.493553340,
-0.561720431)
1224 lb(isam)
= ub(isam
- 1)
+ 1
1232call setRebound(var, [
1_IK,
0_IK], [ndim, nsam])
1233call setRebound(mean, [
1_IK,
0_IK], [ndim, nsam])
1238-0.570608616,
+0.675416708,
-0.1638094