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

Generate and return the Kolmogorov distance of a sample1 of size nsam1 from another sample sample2 of size nsam2 or the CDF of the Uniform or a custom reference distribution.
More...

Detailed Description

Generate and return the Kolmogorov distance of a sample1 of size nsam1 from another sample sample2 of size nsam2 or the CDF of the Uniform or a custom reference distribution.

See pm_distanceKolm for the mathematical definition of the Kolmogorov distance.

Parameters
[in]sample1: The input vector of size nsam1 of the same type and kind as the output disKolm, representing the first sample whose distance form the other sample must be computed.
[in]weight1: The input vector of the same size as the size of sample1 of,
  1. type integer of default kind IK,
  2. type real of the same kind as that of the output disKolm of type real,
representing the weights of the corresponding elements of the input sample1.
(optional. default = [(1, i = 1, size(sample1))]. It must be present if the input argument weight2 is also present.)
[in]weisum1: The input scalar of the same type and kind as the input weight1, containing the value sum(weight1).
(optional. It must be present if and only if the input argument weight1 is also present.)
[in]sample2: The input vector of size nsam2 of the same type and kind as the input disKolm, representing the second sample whose distance form the other sample must be computed.
(optional, the default is the Uniform distribution. It must be present if and only if the input argument getCDF is missing.)
[in]weight2: The input vector of the same size as the size of sample2 of,
  1. type integer of default kind IK,
  2. type real of the same kind as that of the output disKolm of type real,
representing the weights of the corresponding elements of the input sample2.
(optional. default = [(1, i = 1, size(sample2))]. It can be present only if the input argument wieght1 and sample2 are also present.)
[in]weisum2: The input scalar of the same type and kind as the input weight2, containing the value sum(weight2).
(optional. It must be present if and only if the input argument weight2 is also present.)
getCDF: The external user-specified function that takes one input scalar argument of the same type and kind as the output disKolm.
It returns a scalar of same type and kind as the output disKolm, representing the Cumulative Distribution Function (CDF) of the continuous distribution whose Kolmogorov distance with respect to the input sample1 must be measured.
The following illustrates the generic interface of getCDF(),
function getCDF(x) result(cdf)
real(RKG), intent(in) :: x
real(RKG) :: cdf
end function
where RKG refers to the kind type parameter of the output disKolm.
(optional, the default is the CDF of the Uniform distribution. It must be present if and only if the input argument sample2 is missing.)
[in]order: The input scalar that can be,
  1. the constant ascending or an object of type ascending_type, implying that the input samples are both sorted in ascending order.
(optional. If missing, the samples will be sorted in ascending order before computing the distance.)
Returns
disKolm : The output scalar of,
  1. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
representing the Kolmogorov distance of sample1 from sample2.


Possible calling interfaces

use pm_distanceKolm, only: getDisKolm, ascending
! unweighted sample against uniform distribution.
disKolm = getDisKolm(sample1(:))
disKolm = getDisKolm(sample1(:), order)
! weighted sample against uniform distribution.
disKolm = getDisKolm(sample1(:), weight1(:), weisum1)
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, order)
! unweighted sample against custom distribution CDF.
disKolm = getDisKolm(sample1(:), getCDF)
disKolm = getDisKolm(sample1(:), getCDF, order)
! weighted sample against custom distribution CDF.
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, getCDF)
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, getCDF, order)
! unweighted samples.
disKolm = getDisKolm(sample1(:), sample2(:))
disKolm = getDisKolm(sample1(:), sample2(:), order)
! one weighted sample.
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, sample2(:))
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, sample2(:), order)
! two weighted samples.
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, sample2(:), weight2(:), weisum2)
disKolm = getDisKolm(sample1(:), weight1(:), weisum1, sample2(:), weight2(:), weisum2, order)
Generate and return the Kolmogorov distance of a sample1 of size nsam1 from another sample sample2 of...
This module contains classes and procedures for computing the Kolmogorov statistical distance.
Warning
The condition all(0 <= weight1) must hold for the corresponding input arguments.
The condition all(0 <= weight2) must hold for the corresponding input arguments.
The condition weisum1 == sum(weight1) must hold for the corresponding input arguments.
The condition weisum2 == sum(weight2) must hold for the corresponding input arguments.
The condition size(sample1) == size(weight1) must hold for the corresponding input arguments.
The condition size(sample2) == size(weight2) must hold for the corresponding input arguments.
The condition isAscending(sample1) .or. .not. same_type_as(order, ascending) must hold for the corresponding input arguments.
The condition isAscending(sample2) .or. .not. same_type_as(order, ascending) must hold for the corresponding input arguments.
The condition all(0 <= sample1) .and. all(sample1 <= 1) .or. present(sample2) must hold for the corresponding input arguments.
The condition all(0 <= sample1) .and. all(sample1 <= 1) must hold for the corresponding input arguments when the input arguments getCDF and sample2 are both missing.
The condition 0 <= getCDF(x) <= 1 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 returned distance is 0 if any of the two samples are empty.
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.


Example usage

1program example
2
3 use pm_kind, only: SK, IK
4 use pm_distUnif, only: getUnifRand
6 use pm_distanceKolm, only: ascending
9 use pm_arraySort, only: getSorted
10 use pm_arrayFill, only: getFilled
11 use pm_io, only: display_type
12
13 implicit none
14
15 type(display_type) :: disp
16 integer(IK) :: nsam1, nsam2
17 integer(IK) :: itry, ntry = 10
18 disp = display_type(file = "main.out.F90")
19
20 call disp%skip()
21 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
22 call disp%show("! Compute the Kolmogorov distance of one sample w.r.t. Uniform or arbitrary distribution.")
23 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
24 call disp%skip()
25
26 block
27 use pm_kind, only: TKG => RKS ! all other real kinds are also supported.
28 integer(IK), allocatable :: iweight1(:)
29 real(TKG), allocatable :: rweight1(:)
30 real(TKG), allocatable :: sample1(:)
31 real(TKG) :: disKolm
32 do itry = 1, ntry
33 call disp%show("nsam1 = getUnifRand(0, 10)")
34 nsam1 = getUnifRand(0, 10)
35 call disp%show("sample1 = getUnifRand(0., 1., nsam1)")
36 sample1 = getUnifRand(0., 1., nsam1)
37 call disp%show("sample1")
38 call disp%show( sample1 )
39 call disp%show("disKolm = getDisKolm(sample1) ! assuming unweighted samples.")
40 disKolm = getDisKolm(sample1) ! assuming unweighted samples.
41 call disp%show("disKolm")
42 call disp%show( disKolm )
43 call disp%show("disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.")
44 disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
45 call disp%show("disKolm")
46 call disp%show( disKolm )
47 call disp%show("disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.")
48 disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
49 call disp%show("disKolm")
50 call disp%show( disKolm )
51 call disp%show("disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.")
52 disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
53 call disp%show("disKolm")
54 call disp%show( disKolm )
55 call disp%skip()
56 call disp%show("iweight1 = getUnifRand(0, 9, nsam1)")
57 iweight1 = getUnifRand(0, 9, nsam1)
58 call disp%show("iweight1")
59 call disp%show( iweight1 )
60 call disp%show("rweight1 = iweight1")
61 rweight1 = iweight1
62 call disp%show("disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))")
63 disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
64 call disp%show("disKolm")
65 call disp%show( disKolm )
66 call disp%show("disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)")
67 disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
68 call disp%show("disKolm")
69 call disp%show( disKolm )
70 call disp%show("disKolm = getDisKolm(sample1, iweight1, sum(iweight1))")
71 disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
72 call disp%show("disKolm")
73 call disp%show( disKolm )
74 call disp%show("disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)")
75 disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
76 call disp%show("disKolm")
77 call disp%show( disKolm )
78 call disp%show("disKolm = getDisKolm(sample1, rweight1, sum(rweight1))")
79 disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
80 call disp%show("disKolm")
81 call disp%show( disKolm )
82 call disp%show("disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)")
83 disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
84 call disp%show("disKolm")
85 call disp%show( disKolm )
86 call disp%skip()
87 end do
88 end block
89
90 call disp%skip()
91 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
92 call disp%show("! Compute the Kolmogorov distance of two samples.")
93 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
94 call disp%skip()
95
96 block
97 use pm_kind, only: TKG => RKS ! all other real kinds are also supported.
98 integer(IK), allocatable :: iweight1(:), iweight2(:)
99 real(TKG), allocatable :: rweight1(:), rweight2(:)
100 real(TKG), allocatable :: sample1(:), sample2(:)
101 real(TKG) :: disKolm
102 do itry = 1, ntry
103 call disp%show("nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)")
104 nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
105 call disp%show("sample1 = getUnifRand(0., 1., nsam1)")
106 sample1 = getUnifRand(0., 1., nsam1)
107 call disp%show("sample1")
108 call disp%show( sample1 )
109 call disp%show("sample2 = getUnifRand(0., 1., nsam2)")
110 sample2 = getUnifRand(0., 1., nsam2)
111 call disp%show("sample2")
112 call disp%show( sample2 )
113 call disp%show("disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.")
114 disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
115 call disp%show("disKolm")
116 call disp%show( disKolm )
117 call disp%show("disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.")
118 disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
119 call disp%show("disKolm")
120 call disp%show( disKolm )
121 call disp%skip()
122 call disp%show("iweight1 = getUnifRand(0, 9, nsam1)")
123 iweight1 = getUnifRand(0, 9, nsam1)
124 call disp%show("iweight1")
125 call disp%show( iweight1 )
126 call disp%show("rweight1 = iweight1")
127 rweight1 = iweight1
128 call disp%show("disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)")
129 disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
130 call disp%show("disKolm")
131 call disp%show( disKolm )
132 call disp%show("disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)")
133 disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
134 call disp%show("disKolm")
135 call disp%show( disKolm )
136 call disp%show("disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)")
137 disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
138 call disp%show("disKolm")
139 call disp%show( disKolm )
140 call disp%skip()
141 call disp%show("iweight2 = getUnifRand(0, 9, nsam2)")
142 iweight2 = getUnifRand(0, 9, nsam2)
143 call disp%show("iweight2")
144 call disp%show( iweight2 )
145 call disp%show("rweight2 = iweight2")
146 rweight2 = iweight2
147 call disp%show("disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))")
148 disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
149 call disp%show("disKolm")
150 call disp%show( disKolm )
151 call disp%show("disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))")
152 disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
153 call disp%show("disKolm")
154 call disp%show( disKolm )
155 call disp%show("disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))")
156 disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
157 call disp%show("disKolm")
158 call disp%show( disKolm )
159 call disp%skip()
160 end do
161 end block
162
163contains
164
165 function getUnifCDF_RKS(x) result(cdf)
166 use pm_distUnif, only: getUnifCDF
167 use pm_kind, only: RKG => RKS
168 real(RKG), intent(in) :: x
169 real(RKG) :: cdf
170 cdf = getUnifCDF(x)
171 end function
172
173end program example
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 the Cumulative Distribution Function (CDF) of a univariate Standard Uniform distr...
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
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...
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
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 Kolmogorov distance of one sample w.r.t. Uniform or arbitrary distribution.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6nsam1 = getUnifRand(0, 10)
7sample1 = getUnifRand(0., 1., nsam1)
8sample1
9+0.624347091, +0.795805514, +0.342734814, +0.566092849
10disKolm = getDisKolm(sample1) ! assuming unweighted samples.
11disKolm
12+0.342734814
13disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
14disKolm
15+0.342734814
16disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
17disKolm
18+0.342734814
19disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
20disKolm
21+0.342734814
22
23iweight1 = getUnifRand(0, 9, nsam1)
24iweight1
25+7, +8, +8, +9
26rweight1 = iweight1
27disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
28disKolm
29+0.342734814
30disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
31disKolm
32+0.342734814
33disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
34disKolm
35+0.342734814
36disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
37disKolm
38+0.342734814
39disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
40disKolm
41+0.342734814
42disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
43disKolm
44+0.342734814
45
46nsam1 = getUnifRand(0, 10)
47sample1 = getUnifRand(0., 1., nsam1)
48sample1
49+0.447333097
50disKolm = getDisKolm(sample1) ! assuming unweighted samples.
51disKolm
52+0.552666903
53disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
54disKolm
55+0.552666903
56disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
57disKolm
58+0.552666903
59disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
60disKolm
61+0.552666903
62
63iweight1 = getUnifRand(0, 9, nsam1)
64iweight1
65+7
66rweight1 = iweight1
67disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
68disKolm
69+0.552666903
70disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
71disKolm
72+0.552666903
73disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
74disKolm
75+0.552666903
76disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
77disKolm
78+0.552666903
79disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
80disKolm
81+0.552666903
82disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
83disKolm
84+0.552666903
85
86nsam1 = getUnifRand(0, 10)
87sample1 = getUnifRand(0., 1., nsam1)
88sample1
89+0.916549146, +0.378229141, +0.790342271, +0.464243114, +0.877207756, +0.100165427, +0.704494059
90disKolm = getDisKolm(sample1) ! assuming unweighted samples.
91disKolm
92+0.275922596
93disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
94disKolm
95+0.275922596
96disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
97disKolm
98+0.275922596
99disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
100disKolm
101+0.275922596
102
103iweight1 = getUnifRand(0, 9, nsam1)
104iweight1
105+3, +1, +8, +4, +5, +9, +6
106rweight1 = iweight1
107disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
108disKolm
109+0.315605164
110disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
111disKolm
112+0.315605164
113disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
114disKolm
115+0.315605164
116disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
117disKolm
118+0.315605164
119disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
120disKolm
121+0.315605164
122disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
123disKolm
124+0.315605164
125
126nsam1 = getUnifRand(0, 10)
127sample1 = getUnifRand(0., 1., nsam1)
128sample1
129+0.717904568, +0.626077592, +0.167240977, +0.691282153E-1
130disKolm = getDisKolm(sample1) ! assuming unweighted samples.
131disKolm
132+0.332759023
133disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
134disKolm
135+0.332759023
136disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
137disKolm
138+0.332759023
139disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
140disKolm
141+0.332759023
142
143iweight1 = getUnifRand(0, 9, nsam1)
144iweight1
145+4, +5, +5, +1
146rweight1 = iweight1
147disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
148disKolm
149+0.282095432
150disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
151disKolm
152+0.282095432
153disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
154disKolm
155+0.282095432
156disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
157disKolm
158+0.282095432
159disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
160disKolm
161+0.282095432
162disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
163disKolm
164+0.282095432
165
166nsam1 = getUnifRand(0, 10)
167sample1 = getUnifRand(0., 1., nsam1)
168sample1
169+0.304361880, +0.257395744
170disKolm = getDisKolm(sample1) ! assuming unweighted samples.
171disKolm
172+0.695638120
173disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
174disKolm
175+0.695638120
176disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
177disKolm
178+0.695638120
179disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
180disKolm
181+0.695638120
182
183iweight1 = getUnifRand(0, 9, nsam1)
184iweight1
185+8, +1
186rweight1 = iweight1
187disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
188disKolm
189+0.695638120
190disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
191disKolm
192+0.695638120
193disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
194disKolm
195+0.695638120
196disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
197disKolm
198+0.695638120
199disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
200disKolm
201+0.695638120
202disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
203disKolm
204+0.695638120
205
206nsam1 = getUnifRand(0, 10)
207sample1 = getUnifRand(0., 1., nsam1)
208sample1
209+0.383628070
210disKolm = getDisKolm(sample1) ! assuming unweighted samples.
211disKolm
212+0.616371930
213disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
214disKolm
215+0.616371930
216disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
217disKolm
218+0.616371930
219disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
220disKolm
221+0.616371930
222
223iweight1 = getUnifRand(0, 9, nsam1)
224iweight1
225+9
226rweight1 = iweight1
227disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
228disKolm
229+0.616371930
230disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
231disKolm
232+0.616371930
233disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
234disKolm
235+0.616371930
236disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
237disKolm
238+0.616371930
239disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
240disKolm
241+0.616371930
242disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
243disKolm
244+0.616371930
245
246nsam1 = getUnifRand(0, 10)
247sample1 = getUnifRand(0., 1., nsam1)
248sample1
249+0.643387318, +0.346974015
250disKolm = getDisKolm(sample1) ! assuming unweighted samples.
251disKolm
252+0.356612682
253disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
254disKolm
255+0.356612682
256disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
257disKolm
258+0.356612682
259disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
260disKolm
261+0.356612682
262
263iweight1 = getUnifRand(0, 9, nsam1)
264iweight1
265+2, +0
266rweight1 = iweight1
267disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
268disKolm
269+0.643387318
270disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
271disKolm
272+0.643387318
273disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
274disKolm
275+0.643387318
276disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
277disKolm
278+0.643387318
279disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
280disKolm
281+0.643387318
282disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
283disKolm
284+0.643387318
285
286nsam1 = getUnifRand(0, 10)
287sample1 = getUnifRand(0., 1., nsam1)
288sample1
289+0.493739724, +0.898945212
290disKolm = getDisKolm(sample1) ! assuming unweighted samples.
291disKolm
292+0.493739724
293disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
294disKolm
295+0.493739724
296disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
297disKolm
298+0.493739724
299disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
300disKolm
301+0.493739724
302
303iweight1 = getUnifRand(0, 9, nsam1)
304iweight1
305+0, +7
306rweight1 = iweight1
307disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
308disKolm
309+0.898945212
310disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
311disKolm
312+0.898945212
313disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
314disKolm
315+0.898945212
316disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
317disKolm
318+0.898945212
319disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
320disKolm
321+0.898945212
322disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
323disKolm
324+0.898945212
325
326nsam1 = getUnifRand(0, 10)
327sample1 = getUnifRand(0., 1., nsam1)
328sample1
329+0.359618664E-1, +0.974963903E-1, +0.353885412, +0.119003057E-1, +0.238083780, +0.565811992E-1, +0.932155371, +0.491428614
330disKolm = getDisKolm(sample1) ! assuming unweighted samples.
331disKolm
332+0.402503610
333disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
334disKolm
335+0.402503610
336disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
337disKolm
338+0.402503610
339disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
340disKolm
341+0.402503610
342
343iweight1 = getUnifRand(0, 9, nsam1)
344iweight1
345+5, +3, +1, +5, +4, +5, +6, +4
346rweight1 = iweight1
347disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
348disKolm
349+0.447958171
350disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
351disKolm
352+0.447958171
353disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
354disKolm
355+0.447958171
356disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
357disKolm
358+0.447958171
359disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
360disKolm
361+0.447958171
362disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
363disKolm
364+0.447958171
365
366nsam1 = getUnifRand(0, 10)
367sample1 = getUnifRand(0., 1., nsam1)
368sample1
369+0.102512360, +0.803096294E-1, +0.303076267, +0.474512339, +0.658946455, +0.270897388, +0.130082250, +0.978469849E-1, +0.922258615
370disKolm = getDisKolm(sample1) ! assuming unweighted samples.
371disKolm
372+0.363590419
373disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
374disKolm
375+0.363590419
376disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
377disKolm
378+0.363590419
379disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
380disKolm
381+0.363590419
382
383iweight1 = getUnifRand(0, 9, nsam1)
384iweight1
385+2, +6, +6, +4, +8, +7, +9, +6, +6
386rweight1 = iweight1
387disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
388disKolm
389+0.363590419
390disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
391disKolm
392+0.363590419
393disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
394disKolm
395+0.363590360
396disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
397disKolm
398+0.363590360
399disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
400disKolm
401+0.363590360
402disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
403disKolm
404+0.363590360
405
406
407!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
408! Compute the Kolmogorov distance of two samples.
409!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
410
411nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
412sample1 = getUnifRand(0., 1., nsam1)
413sample1
414+0.885907531
415sample2 = getUnifRand(0., 1., nsam2)
416sample2
417+0.577589452, +0.553508461, +0.864089966, +0.447598457, +0.258683026, +0.793058276E-1, +0.797105193
418disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
419disKolm
420+1.00000000
421disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
422disKolm
423+1.00000000
424
425iweight1 = getUnifRand(0, 9, nsam1)
426iweight1
427+6
428rweight1 = iweight1
429disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
430disKolm
431+1.00000000
432disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
433disKolm
434+1.00000000
435disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
436disKolm
437+1.00000000
438
439iweight2 = getUnifRand(0, 9, nsam2)
440iweight2
441+3, +7, +3, +5, +9, +3, +0
442rweight2 = iweight2
443disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
444disKolm
445+1.00000000
446disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
447disKolm
448+1.00000012
449disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
450disKolm
451+1.00000012
452
453nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
454sample1 = getUnifRand(0., 1., nsam1)
455sample1
456+0.798392832, +0.349904537, +0.198252141, +0.890031397
457sample2 = getUnifRand(0., 1., nsam2)
458sample2
459+0.562371075, +0.927726924, +0.438646078, +0.574812174, +0.558548093, +0.513146520, +0.601736009
460disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
461disKolm
462+0.500000000
463disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
464disKolm
465+0.500000000
466
467iweight1 = getUnifRand(0, 9, nsam1)
468iweight1
469+9, +1, +3, +4
470rweight1 = iweight1
471disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
472disKolm
473+0.621848822
474disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
475disKolm
476+0.621848822
477disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
478disKolm
479+0.621848822
480
481iweight2 = getUnifRand(0, 9, nsam2)
482iweight2
483+8, +2, +7, +7, +1, +4, +3
484rweight2 = iweight2
485disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
486disKolm
487+0.702205896
488disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
489disKolm
490+0.702205896
491disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
492disKolm
493+0.702205896
494
495nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
496sample1 = getUnifRand(0., 1., nsam1)
497sample1
498+0.777364314, +0.837822378, +0.567450523
499sample2 = getUnifRand(0., 1., nsam2)
500sample2
501+0.996041298E-1, +0.286780834, +0.918943882, +0.483206093
502disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
503disKolm
504+0.750000000
505disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
506disKolm
507+0.750000000
508
509iweight1 = getUnifRand(0, 9, nsam1)
510iweight1
511+4, +1, +8
512rweight1 = iweight1
513disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
514disKolm
515+0.750000000
516disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
517disKolm
518+0.750000000
519disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
520disKolm
521+0.750000000
522
523iweight2 = getUnifRand(0, 9, nsam2)
524iweight2
525+5, +2, +4, +6
526rweight2 = iweight2
527disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
528disKolm
529+0.764705896
530disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
531disKolm
532+0.764705896
533disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
534disKolm
535+0.764705896
536
537nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
538sample1 = getUnifRand(0., 1., nsam1)
539sample1
540+0.562488973, +0.673627913, +0.534842193
541sample2 = getUnifRand(0., 1., nsam2)
542sample2
543+0.633622766, +0.606355786, +0.888287187, +0.982027233, +0.418524325, +0.571220756, +0.102164745E-1, +0.848675430, +0.457589626E-1
544disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
545disKolm
546+0.333333343
547disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
548disKolm
549+0.333333343
550
551iweight1 = getUnifRand(0, 9, nsam1)
552iweight1
553+5, +9, +0
554rweight1 = iweight1
555disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
556disKolm
557+0.333333343
558disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
559disKolm
560+0.333333343
561disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
562disKolm
563+0.333333343
564
565iweight2 = getUnifRand(0, 9, nsam2)
566iweight2
567+2, +6, +6, +0, +2, +1, +3, +9, +9
568rweight2 = iweight2
569disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
570disKolm
571+0.394736826
572disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
573disKolm
574+0.394736886
575disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
576disKolm
577+0.394736886
578
579nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
580sample1 = getUnifRand(0., 1., nsam1)
581sample1
582+0.446284115, +0.666748881E-1, +0.487574935
583sample2 = getUnifRand(0., 1., nsam2)
584sample2
585+0.348782122, +0.524147332, +0.638986468, +0.141339183, +0.233903110, +0.948014975
586disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
587disKolm
588+0.500000000
589disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
590disKolm
591+0.500000000
592
593iweight1 = getUnifRand(0, 9, nsam1)
594iweight1
595+7, +6, +1
596rweight1 = iweight1
597disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
598disKolm
599+0.500000000
600disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
601disKolm
602+0.500000000
603disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
604disKolm
605+0.500000000
606
607iweight2 = getUnifRand(0, 9, nsam2)
608iweight2
609+3, +9, +2, +5, +9, +5
610rweight2 = iweight2
611disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
612disKolm
613+0.484848499
614disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
615disKolm
616+0.484848499
617disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
618disKolm
619+0.484848499
620
621nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
622sample1 = getUnifRand(0., 1., nsam1)
623sample1
624+0.770448387, +0.688933611
625sample2 = getUnifRand(0., 1., nsam2)
626sample2
627
628disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
629disKolm
630+0.00000000
631disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
632disKolm
633+0.00000000
634
635iweight1 = getUnifRand(0, 9, nsam1)
636iweight1
637+5, +3
638rweight1 = iweight1
639disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
640disKolm
641+0.00000000
642disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
643disKolm
644+0.00000000
645disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
646disKolm
647+0.00000000
648
649iweight2 = getUnifRand(0, 9, nsam2)
650iweight2
651
652rweight2 = iweight2
653disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
654disKolm
655+0.00000000
656disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
657disKolm
658+0.00000000
659disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
660disKolm
661+0.00000000
662
663nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
664sample1 = getUnifRand(0., 1., nsam1)
665sample1
666
667sample2 = getUnifRand(0., 1., nsam2)
668sample2
669+0.523479581, +0.799529672, +0.776637852, +0.341538191E-1, +0.847989678, +0.867558002, +0.299357653
670disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
671disKolm
672+0.00000000
673disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
674disKolm
675+0.00000000
676
677iweight1 = getUnifRand(0, 9, nsam1)
678iweight1
679
680rweight1 = iweight1
681disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
682disKolm
683+0.00000000
684disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
685disKolm
686+0.00000000
687disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
688disKolm
689+0.00000000
690
691iweight2 = getUnifRand(0, 9, nsam2)
692iweight2
693+1, +5, +7, +6, +0, +8, +4
694rweight2 = iweight2
695disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
696disKolm
697+0.00000000
698disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
699disKolm
700+0.00000000
701disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
702disKolm
703+0.00000000
704
705nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
706sample1 = getUnifRand(0., 1., nsam1)
707sample1
708+0.594481230E-1, +0.544176400, +0.619935989, +0.396251678E-2
709sample2 = getUnifRand(0., 1., nsam2)
710sample2
711+0.751352906, +0.904578567, +0.601069629, +0.371777654, +0.953513801
712disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
713disKolm
714+0.600000024
715disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
716disKolm
717+0.600000024
718
719iweight1 = getUnifRand(0, 9, nsam1)
720iweight1
721+7, +0, +2, +7
722rweight1 = iweight1
723disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
724disKolm
725+0.875000000
726disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
727disKolm
728+0.875000000
729disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
730disKolm
731+0.875000000
732
733iweight2 = getUnifRand(0, 9, nsam2)
734iweight2
735+3, +8, +0, +3, +0
736rweight2 = iweight2
737disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
738disKolm
739+0.875000000
740disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
741disKolm
742+0.875000000
743disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
744disKolm
745+0.875000000
746
747nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
748sample1 = getUnifRand(0., 1., nsam1)
749sample1
750+0.522765815
751sample2 = getUnifRand(0., 1., nsam2)
752sample2
753+0.923354685, +0.228304625, +0.631594241
754disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
755disKolm
756+0.666666627
757disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
758disKolm
759+0.666666627
760
761iweight1 = getUnifRand(0, 9, nsam1)
762iweight1
763+5
764rweight1 = iweight1
765disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
766disKolm
767+0.666666627
768disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
769disKolm
770+0.666666627
771disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
772disKolm
773+0.666666627
774
775iweight2 = getUnifRand(0, 9, nsam2)
776iweight2
777+6, +5, +7
778rweight2 = iweight2
779disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
780disKolm
781+0.722222209
782disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
783disKolm
784+0.722222209
785disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
786disKolm
787+0.722222209
788
789nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
790sample1 = getUnifRand(0., 1., nsam1)
791sample1
792+0.926965475E-2, +0.789496899, +0.149928868, +0.162669420, +0.427896440, +0.313291550E-1
793sample2 = getUnifRand(0., 1., nsam2)
794sample2
795+0.765802503, +0.942707300, +0.205031991, +0.520078063, +0.562458992, +0.583359480, +0.432790816, +0.614580572, +0.954010010, +0.897577763
796disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
797disKolm
798+0.733333349
799disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
800disKolm
801+0.733333349
802
803iweight1 = getUnifRand(0, 9, nsam1)
804iweight1
805+6, +4, +6, +6, +0, +0
806rweight1 = iweight1
807disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
808disKolm
809+0.818181872
810disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
811disKolm
812+0.818181872
813disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
814disKolm
815+0.818181872
816
817iweight2 = getUnifRand(0, 9, nsam2)
818iweight2
819+4, +3, +4, +2, +9, +8, +0, +0, +4, +9
820rweight2 = iweight2
821disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
822disKolm
823+0.818181872
824disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
825disKolm
826+0.818181872
827disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
828disKolm
829+0.818181872
830
831
Test:
test_pm_distanceKolm
Internal naming convention:
The following illustrates the internal naming convention used for the procedures within this generic interface.
getDisKolmSSD_WDD_D1_RK5()
||| ||| || |||
||| ||| || |||
||| ||| || |||
||| ||| || |The Kind of the output.
||| ||| The rank of the input sample(s).
||| The sample weight types: WDD => default(unweighted) / default(unweighted), WID => integer-weighted, default, WRD => real-weighted, default., WII => integer-weighted, integer-weighted, WRR => real-weighted, real-weighted.
||The order of the input samples: D => default(unordered), O => ordered.
The entities in the distance computation, S => sample, X => default(uniform) distribution, C => custom user-specified CDF.


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, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.

Definition at line 212 of file pm_distanceKolm.F90.


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