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.646962404,
+0.532547116,
+0.166158497,
+0.287272453,
+0.133619487,
+0.604416907
12+0.662925482,
+0.842895091
15+0.133619487,
+0.166158497,
+0.287272453,
+0.532547116,
+0.604416907,
+0.646962404
17+0.662925482,
+0.842895091
31call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
34call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
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.889413357E-1,
+0.557361722,
+0.170154750,
+0.456446409,
+0.766615629
61+0.196615338,
+0.194720805,
+0.137082815,
+0.687444568,
+0.765978515,
+0.195795655,
+0.847779691,
+0.808939517,
+0.166318715,
+0.939104915
64+0.889413357E-1,
+0.170154750,
+0.456446409,
+0.557361722,
+0.766615629
66+0.137082815,
+0.166318715,
+0.194720805,
+0.195795655,
+0.196615338,
+0.687444568,
+0.765978515,
+0.808939517,
+0.847779691,
+0.939104915
80call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
83call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
92+1,
+2,
+6,
+7,
+2,
+4,
+8,
+0,
+0,
+4
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.611419976,
+0.366717160,
+0.767365992,
+0.637306511
110+0.938903689E-1,
+0.706426084
113+0.366717160,
+0.611419976,
+0.637306511,
+0.767365992
115+0.938903689E-1,
+0.706426084
129call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
132call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
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.876878500E-1,
+0.774091482E-2,
+0.968798816
159+0.656497419,
+0.475148141,
+0.118892074,
+0.580197513,
+0.508554995,
+0.828858197,
+0.708992600
162+0.774091482E-2,
+0.876878500E-1,
+0.968798816
164+0.118892074,
+0.475148141,
+0.508554995,
+0.580197513,
+0.656497419,
+0.708992600,
+0.828858197
178call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
181call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
190+3,
+5,
+6,
+8,
+9,
+4,
+7
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.792912126,
+0.323796153,
+0.297530890E-1,
+0.611464322,
+0.435986161,
+0.753435194,
+0.993133664
208+0.868039131E-1,
+0.197582841E-1,
+0.833022475,
+0.226267338,
+0.665632844
211+0.297530890E-1,
+0.323796153,
+0.435986161,
+0.611464322,
+0.753435194,
+0.792912126,
+0.993133664
213+0.197582841E-1,
+0.868039131E-1,
+0.226267338,
+0.665632844,
+0.833022475
222+6,
+0,
+9,
+5,
+7,
+1,
+8
227call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
230call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
236+5,
+9,
+1,
+9,
+8,
+1,
+8
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.132691383,
+0.993322790,
+0.587872028,
+0.129377723,
+0.384717226,
+0.670644283
260+0.129377723,
+0.132691383,
+0.384717226,
+0.587872028,
+0.670644283,
+0.993322790
271+8,
+1,
+5,
+5,
+1,
+7
276call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
279call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
285+0,
+8,
+6,
+0,
+5,
+0
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))
325call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
328call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
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))
355+0.791043103,
+0.510438442,
+0.307160199,
+0.465624332,
+0.539878309,
+0.253050029,
+0.887461066,
+0.637003183,
+0.651825666E-1,
+0.375136077
360+0.651825666E-1,
+0.253050029,
+0.307160199,
+0.375136077,
+0.465624332,
+0.510438442,
+0.539878309,
+0.637003183,
+0.791043103,
+0.887461066
374call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
377call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
386+3,
+9,
+2,
+6,
+7,
+5,
+9,
+2,
+8,
+9
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.234306574,
+0.680121958,
+0.288484275,
+0.794596732,
+0.448454440
407+0.234306574,
+0.288484275,
+0.448454440,
+0.680121958,
+0.794596732
423call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
426call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
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.918694615,
+0.990277946,
+0.941745400,
+0.414191008
453+0.667069733,
+0.278551996,
+0.950680375E-1,
+0.639434516,
+0.828531444,
+0.779883265E-1,
+0.314169228
456+0.414191008,
+0.918694615,
+0.941745400,
+0.990277946
458+0.779883265E-1,
+0.950680375E-1,
+0.278551996,
+0.314169228,
+0.639434516,
+0.667069733,
+0.828531444
472call setDisKolm(disKolm, sample1, iweight1,
sum(iweight1), sample2)
475call setDisKolm(disKolm, sample1, rweight1,
sum(rweight1), sample2)
484+0,
+8,
+3,
+7,
+0,
+7,
+5
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))