15 type(display_type) :: disp
16 integer(IK) :: nsam1, nsam2
17 integer(IK) :: itry, ntry
= 10
21 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
22 call disp%show(
"! Compute the Kolmogorov distance of two unweighted samples.")
23 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
28 integer(IK),
allocatable :: iweight1(:), iweight2(:)
29 real(TKG),
allocatable :: rweight1(:), rweight2(:)
30 real(TKG),
allocatable :: sample1(:), sample2(:)
33 call disp%show(
"nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)")
35 call disp%show(
"sample1 = getUnifRand(0., 1., nsam1)")
39 call disp%show(
"sample2 = getUnifRand(0., 1., nsam2)")
43 call disp%show(
"call setDisKolm(disKolm, sample1, sample2)")
51 call disp%show(
"call setDisKolm(disKolm, getSorted(sample1), getSorted(sample2), ascending)")
56 call disp%show(
"iweight1 = getUnifRand(0, 9, nsam1)")
60 call disp%show(
"rweight1 = iweight1")
62 call disp%show(
"call setDisKolm(disKolm, getSorted(getVerbose(sample1, iweight1, sum(iweight1))), getSorted(sample2), ascending)")
66 call disp%show(
"call setDisKolm(disKolm, sample1, iweight1, sum(iweight1), sample2)")
67 call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
70 call disp%show(
"call setDisKolm(disKolm, sample1, rweight1, sum(rweight1), sample2)")
71 call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
75 call disp%show(
"iweight1 = getUnifRand(0, 9, nsam1)")
79 call disp%show(
"iweight2 = getUnifRand(0, 9, nsam2)")
83 call disp%show(
"rweight1 = iweight1; rweight2 = iweight2")
84 rweight1
= iweight1; rweight2
= iweight2
85 call disp%show(
"call setDisKolm(disKolm, getSorted(getVerbose(sample1, iweight1, sum(iweight1))), getSorted(getVerbose(sample2, iweight2, sum(iweight2))), ascending)")
89 call disp%show(
"call setDisKolm(disKolm, sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))")
90 call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
93 call disp%show(
"call setDisKolm(disKolm, sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))")
94 call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
Generate and return an array of the specified rank and shape of arbitrary intrinsic type and kind wit...
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Generate and return the sorted elements of the input scalar string or contiguous vector in ascending ...
Generate an equally-weighted (verbose or flattened) array of the input weighted array of rank 1 or 2.
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.
This module contains procedures and generic interfaces for convenient allocation and filling of array...
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains procedures and generic interfaces for various sorting tasks.
This module contains procedures and generic interfaces for flattening (duplicating the elements of) a...
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.
Generate and return an object of type display_type.
9+0.931571484,
+0.110995531
12+0.457399786,
+0.167605162,
+0.287622333,
+0.813541412,
+0.735735536,
+0.284389138,
+0.165165663,
+0.102227449,
+0.831871629E-1,
+0.584797621
15+0.110995531,
+0.931571484
17+0.831871629E-1,
+0.102227449,
+0.165165663,
+0.167605162,
+0.284389138,
+0.287622333,
+0.457399786,
+0.584797621,
+0.735735536,
+0.813541412
31call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
34call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
43+3,
+4,
+4,
+6,
+4,
+4,
+1,
+1,
+3,
+8
44rweight1
= iweight1; rweight2
= iweight2
48call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
51call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
58+0.216701448,
+0.411540270,
+0.603947580
64+0.216701448,
+0.411540270,
+0.603947580
80call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
83call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
93rweight1
= iweight1; rweight2
= iweight2
97call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
100call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
107+0.161184549,
+0.875498533,
+0.636004627,
+0.143107593,
+0.130053163,
+0.867653549,
+0.844846964
110+0.198523223,
+0.333143950,
+0.383027673,
+0.137604952,
+0.843168497,
+0.692062199,
+0.988395095,
+0.987976074,
+0.237512648,
+0.970388055E-1
113+0.130053163,
+0.143107593,
+0.161184549,
+0.636004627,
+0.844846964,
+0.867653549,
+0.875498533
115+0.970388055E-1,
+0.137604952,
+0.198523223,
+0.237512648,
+0.333143950,
+0.383027673,
+0.692062199,
+0.843168497,
+0.987976074,
+0.988395095
124+1,
+5,
+4,
+7,
+5,
+2,
+6
129call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
132call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
138+7,
+2,
+0,
+8,
+0,
+9,
+1
141+7,
+4,
+3,
+8,
+7,
+9,
+7,
+4,
+6,
+2
142rweight1
= iweight1; rweight2
= iweight2
146call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
149call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
156+0.823514402,
+0.209821463E-1,
+0.418656349
159+0.767507792,
+0.267899692,
+0.624346375,
+0.296286941,
+0.350709081,
+0.396015644
162+0.209821463E-1,
+0.418656349,
+0.823514402
164+0.267899692,
+0.296286941,
+0.350709081,
+0.396015644,
+0.624346375,
+0.767507792
178call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
181call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
190+2,
+5,
+4,
+5,
+4,
+5
191rweight1
= iweight1; rweight2
= iweight2
195call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
198call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
205+0.875822783,
+0.560038149
208+0.158343613,
+0.435239375,
+0.561090529,
+0.489927530E-1,
+0.640377164
211+0.560038149,
+0.875822783
213+0.489927530E-1,
+0.158343613,
+0.435239375,
+0.561090529,
+0.640377164
227call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
230call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
240rweight1
= iweight1; rweight2
= iweight2
244call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
247call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
254+0.395731807,
+0.803265333,
+0.436752379,
+0.165841103,
+0.134208202E-1,
+0.376550555,
+0.332787275,
+0.979622841,
+0.415675938
260+0.134208202E-1,
+0.165841103,
+0.332787275,
+0.376550555,
+0.395731807,
+0.415675938,
+0.436752379,
+0.803265333,
+0.979622841
271+9,
+9,
+8,
+0,
+6,
+3,
+6,
+9,
+0
276call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
279call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
285+3,
+2,
+2,
+5,
+9,
+2,
+7,
+6,
+2
289rweight1
= iweight1; rweight2
= iweight2
293call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
296call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
303+0.621028125,
+0.402078450,
+0.542143404,
+0.882892311,
+0.490416467,
+0.459867895,
+0.356163919,
+0.447853208,
+0.444199860
306+0.241751194,
+0.139997661,
+0.777944505,
+0.916078627,
+0.689117253,
+0.636398673,
+0.706976771,
+0.755873442,
+0.622131288,
+0.474320233
309+0.356163919,
+0.402078450,
+0.444199860,
+0.447853208,
+0.459867895,
+0.490416467,
+0.542143404,
+0.621028125,
+0.882892311
311+0.139997661,
+0.241751194,
+0.474320233,
+0.622131288,
+0.636398673,
+0.689117253,
+0.706976771,
+0.755873442,
+0.777944505,
+0.916078627
320+7,
+8,
+5,
+3,
+3,
+7,
+8,
+3,
+8
325call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
328call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
334+6,
+4,
+1,
+2,
+6,
+7,
+9,
+7,
+5
337+5,
+3,
+5,
+5,
+2,
+3,
+8,
+1,
+6,
+6
338rweight1
= iweight1; rweight2
= iweight2
342call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
345call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
352+0.224194467,
+0.809150815,
+0.312964559
355+0.644271076,
+0.230276108,
+0.182045102E-1,
+0.631263137,
+0.634949207E-1,
+0.187657356,
+0.553981483
358+0.224194467,
+0.312964559,
+0.809150815
360+0.182045102E-1,
+0.634949207E-1,
+0.187657356,
+0.230276108,
+0.553981483,
+0.631263137,
+0.644271076
374call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
377call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
386+6,
+2,
+7,
+7,
+9,
+7,
+1
387rweight1
= iweight1; rweight2
= iweight2
391call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
394call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
401+0.274898529,
+0.456859052,
+0.158884287,
+0.299056828,
+0.608505368,
+0.290375054,
+0.666317225,
+0.772555709,
+0.787933826,
+0.350369394
404+0.800112009,
+0.917383194,
+0.771958768,
+0.174848855,
+0.228327572,
+0.438504159
407+0.158884287,
+0.274898529,
+0.290375054,
+0.299056828,
+0.350369394,
+0.456859052,
+0.608505368,
+0.666317225,
+0.772555709,
+0.787933826
409+0.174848855,
+0.228327572,
+0.438504159,
+0.771958768,
+0.800112009,
+0.917383194
418+9,
+3,
+5,
+1,
+9,
+8,
+1,
+2,
+7,
+4
423call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
426call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
432+8,
+5,
+0,
+0,
+5,
+5,
+8,
+1,
+4,
+3
435+4,
+2,
+6,
+0,
+7,
+3
436rweight1
= iweight1; rweight2
= iweight2
440call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
443call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))
450+0.414434731,
+0.575833321,
+0.838903487,
+0.245039105,
+0.816662908E-1,
+0.239277720,
+0.797441602
456+0.816662908E-1,
+0.239277720,
+0.245039105,
+0.414434731,
+0.575833321,
+0.797441602,
+0.838903487
467+6,
+1,
+5,
+6,
+5,
+8,
+9
472call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
475call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
481+0,
+1,
+6,
+7,
+7,
+8,
+2
485rweight1
= iweight1; rweight2
= iweight2
489call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2, iweight2,
sum(iweight2))
492call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2, rweight2,
sum(rweight2))