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
10disKolm = getDisKolm(sample1) ! assuming unweighted samples.
11disKolm
12+0.00000000
13disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
14disKolm
15+0.00000000
16disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
17disKolm
18+0.00000000
19disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
20disKolm
21+0.00000000
22
23iweight1 = getUnifRand(0, 9, nsam1)
24iweight1
25
26rweight1 = iweight1
27disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
28disKolm
29+0.00000000
30disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
31disKolm
32+0.00000000
33disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
34disKolm
35+0.00000000
36disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
37disKolm
38+0.00000000
39disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
40disKolm
41+0.00000000
42disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
43disKolm
44+0.00000000
45
46nsam1 = getUnifRand(0, 10)
47sample1 = getUnifRand(0., 1., nsam1)
48sample1
49+0.197713554, +0.371412277
50disKolm = getDisKolm(sample1) ! assuming unweighted samples.
51disKolm
52+0.628587723
53disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
54disKolm
55+0.628587723
56disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
57disKolm
58+0.628587723
59disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
60disKolm
61+0.628587723
62
63iweight1 = getUnifRand(0, 9, nsam1)
64iweight1
65+9, +8
66rweight1 = iweight1
67disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
68disKolm
69+0.628587723
70disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
71disKolm
72+0.628587723
73disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
74disKolm
75+0.628587723
76disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
77disKolm
78+0.628587723
79disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
80disKolm
81+0.628587723
82disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
83disKolm
84+0.628587723
85
86nsam1 = getUnifRand(0, 10)
87sample1 = getUnifRand(0., 1., nsam1)
88sample1
89+0.464381576, +0.534748793, +0.198850989
90disKolm = getDisKolm(sample1) ! assuming unweighted samples.
91disKolm
92+0.465251207
93disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
94disKolm
95+0.465251207
96disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
97disKolm
98+0.465251207
99disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
100disKolm
101+0.465251207
102
103iweight1 = getUnifRand(0, 9, nsam1)
104iweight1
105+9, +1, +5
106rweight1 = iweight1
107disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
108disKolm
109+0.468951821
110disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
111disKolm
112+0.468951821
113disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
114disKolm
115+0.468951821
116disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
117disKolm
118+0.468951821
119disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
120disKolm
121+0.468951821
122disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
123disKolm
124+0.468951821
125
126nsam1 = getUnifRand(0, 10)
127sample1 = getUnifRand(0., 1., nsam1)
128sample1
129+0.191357136, +0.122156501, +0.618711889, +0.441578984, +0.402415872, +0.740478456, +0.848264873, +0.393873811
130disKolm = getDisKolm(sample1) ! assuming unweighted samples.
131disKolm
132+0.183421016
133disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
134disKolm
135+0.183421016
136disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
137disKolm
138+0.183421016
139disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
140disKolm
141+0.183421016
142
143iweight1 = getUnifRand(0, 9, nsam1)
144iweight1
145+4, +5, +3, +2, +5, +4, +9, +6
146rweight1 = iweight1
147disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
148disKolm
149+0.157031700
150disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
151disKolm
152+0.157031700
153disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
154disKolm
155+0.157031700
156disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
157disKolm
158+0.157031700
159disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
160disKolm
161+0.157031700
162disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
163disKolm
164+0.157031700
165
166nsam1 = getUnifRand(0, 10)
167sample1 = getUnifRand(0., 1., nsam1)
168sample1
169+0.442736983
170disKolm = getDisKolm(sample1) ! assuming unweighted samples.
171disKolm
172+0.557263017
173disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
174disKolm
175+0.557263017
176disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
177disKolm
178+0.557263017
179disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
180disKolm
181+0.557263017
182
183iweight1 = getUnifRand(0, 9, nsam1)
184iweight1
185+9
186rweight1 = iweight1
187disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
188disKolm
189+0.557263017
190disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
191disKolm
192+0.557263017
193disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
194disKolm
195+0.557263017
196disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
197disKolm
198+0.557263017
199disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
200disKolm
201+0.557263017
202disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
203disKolm
204+0.557263017
205
206nsam1 = getUnifRand(0, 10)
207sample1 = getUnifRand(0., 1., nsam1)
208sample1
209+0.169424057
210disKolm = getDisKolm(sample1) ! assuming unweighted samples.
211disKolm
212+0.830575943
213disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
214disKolm
215+0.830575943
216disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
217disKolm
218+0.830575943
219disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
220disKolm
221+0.830575943
222
223iweight1 = getUnifRand(0, 9, nsam1)
224iweight1
225+7
226rweight1 = iweight1
227disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
228disKolm
229+0.830575943
230disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
231disKolm
232+0.830575943
233disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
234disKolm
235+0.830575943
236disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
237disKolm
238+0.830575943
239disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
240disKolm
241+0.830575943
242disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
243disKolm
244+0.830575943
245
246nsam1 = getUnifRand(0, 10)
247sample1 = getUnifRand(0., 1., nsam1)
248sample1
249+0.166687369E-1, +0.510165215, +0.914015174E-1, +0.669395447, +0.947092056, +0.778882682, +0.948272347E-1
250disKolm = getDisKolm(sample1) ! assuming unweighted samples.
251disKolm
252+0.333744228
253disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
254disKolm
255+0.333744228
256disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
257disKolm
258+0.333744228
259disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
260disKolm
261+0.333744228
262
263iweight1 = getUnifRand(0, 9, nsam1)
264iweight1
265+8, +9, +5, +6, +4, +2, +5
266rweight1 = iweight1
267disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
268disKolm
269+0.366711229
270disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
271disKolm
272+0.366711229
273disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
274disKolm
275+0.366711259
276disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
277disKolm
278+0.366711259
279disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
280disKolm
281+0.366711259
282disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
283disKolm
284+0.366711259
285
286nsam1 = getUnifRand(0, 10)
287sample1 = getUnifRand(0., 1., nsam1)
288sample1
289+0.974131942, +0.945080698, +0.326265037, +0.120788157, +0.651588559, +0.754505634, +0.396041274E-1, +0.661234021
290disKolm = getDisKolm(sample1) ! assuming unweighted samples.
291disKolm
292+0.276588559
293disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
294disKolm
295+0.276588559
296disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
297disKolm
298+0.276588559
299disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
300disKolm
301+0.276588559
302
303iweight1 = getUnifRand(0, 9, nsam1)
304iweight1
305+6, +0, +1, +4, +7, +5, +1, +9
306rweight1 = iweight1
307disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
308disKolm
309+0.469770372
310disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
311disKolm
312+0.469770372
313disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
314disKolm
315+0.469770372
316disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
317disKolm
318+0.469770372
319disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
320disKolm
321+0.469770372
322disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
323disKolm
324+0.469770372
325
326nsam1 = getUnifRand(0, 10)
327sample1 = getUnifRand(0., 1., nsam1)
328sample1
329+0.464599729E-1, +0.676427722, +0.412046134, +0.401831865E-1, +0.351746559, +0.711794376, +0.923447907, +0.282503366, +0.260988712, +0.141272545
330disKolm = getDisKolm(sample1) ! assuming unweighted samples.
331disKolm
332+0.287953854
333disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
334disKolm
335+0.287953854
336disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
337disKolm
338+0.287953854
339disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
340disKolm
341+0.287953854
342
343iweight1 = getUnifRand(0, 9, nsam1)
344iweight1
345+6, +5, +0, +9, +1, +3, +8, +1, +3, +4
346rweight1 = iweight1
347disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
348disKolm
349+0.333727449
350disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
351disKolm
352+0.333727449
353disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
354disKolm
355+0.333727449
356disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
357disKolm
358+0.333727449
359disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
360disKolm
361+0.333727449
362disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
363disKolm
364+0.333727449
365
366nsam1 = getUnifRand(0, 10)
367sample1 = getUnifRand(0., 1., nsam1)
368sample1
369+0.562287033, +0.520435810
370disKolm = getDisKolm(sample1) ! assuming unweighted samples.
371disKolm
372+0.520435810
373disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
374disKolm
375+0.520435810
376disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
377disKolm
378+0.520435810
379disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
380disKolm
381+0.520435810
382
383iweight1 = getUnifRand(0, 9, nsam1)
384iweight1
385+4, +4
386rweight1 = iweight1
387disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
388disKolm
389+0.520435810
390disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
391disKolm
392+0.520435810
393disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
394disKolm
395+0.520435810
396disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
397disKolm
398+0.520435810
399disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
400disKolm
401+0.520435810
402disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
403disKolm
404+0.520435810
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.291638672, +0.585736036E-1, +0.617396116
415sample2 = getUnifRand(0., 1., nsam2)
416sample2
417+0.634287953, +0.830895662, +0.619565785, +0.452596903, +0.175576627, +0.246958613
418disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
419disKolm
420+0.500000000
421disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
422disKolm
423+0.500000000
424
425iweight1 = getUnifRand(0, 9, nsam1)
426iweight1
427+3, +1, +7
428rweight1 = iweight1
429disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
430disKolm
431+0.500000000
432disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
433disKolm
434+0.500000000
435disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
436disKolm
437+0.500000000
438
439iweight2 = getUnifRand(0, 9, nsam2)
440iweight2
441+4, +4, +3, +6, +9, +0
442rweight2 = iweight2
443disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
444disKolm
445+0.423076928
446disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
447disKolm
448+0.423076868
449disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
450disKolm
451+0.423076868
452
453nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
454sample1 = getUnifRand(0., 1., nsam1)
455sample1
456+0.565101922, +0.200835645, +0.724945366, +0.391445160, +0.864927173E-1, +0.844093561E-1, +0.755802512
457sample2 = getUnifRand(0., 1., nsam2)
458sample2
459+0.587069154, +0.482857227, +0.173374951, +0.847422898, +0.483591139, +0.482318580, +0.631893992, +0.539005637
460disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
461disKolm
462+0.446428597
463disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
464disKolm
465+0.446428597
466
467iweight1 = getUnifRand(0, 9, nsam1)
468iweight1
469+0, +8, +6, +4, +7, +9, +1
470rweight1 = iweight1
471disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
472disKolm
473+0.675000012
474disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
475disKolm
476+0.675000012
477disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
478disKolm
479+0.675000012
480
481iweight2 = getUnifRand(0, 9, nsam2)
482iweight2
483+8, +4, +6, +5, +4, +0, +9, +1
484rweight2 = iweight2
485disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
486disKolm
487+0.637837827
488disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
489disKolm
490+0.637837827
491disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
492disKolm
493+0.637837827
494
495nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
496sample1 = getUnifRand(0., 1., nsam1)
497sample1
498+0.472145915, +0.700702906
499sample2 = getUnifRand(0., 1., nsam2)
500sample2
501+0.417814314, +0.786532938, +0.542651832, +0.811610520, +0.184090137, +0.299992561E-1, +0.862949371
502disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
503disKolm
504+0.428571463
505disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
506disKolm
507+0.428571463
508
509iweight1 = getUnifRand(0, 9, nsam1)
510iweight1
511+1, +9
512rweight1 = iweight1
513disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
514disKolm
515+0.471428603
516disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
517disKolm
518+0.471428603
519disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
520disKolm
521+0.471428603
522
523iweight2 = getUnifRand(0, 9, nsam2)
524iweight2
525+7, +3, +9, +9, +3, +0, +6
526rweight2 = iweight2
527disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
528disKolm
529+0.486486495
530disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
531disKolm
532+0.486486435
533disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
534disKolm
535+0.486486435
536
537nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
538sample1 = getUnifRand(0., 1., nsam1)
539sample1
540+0.535946965, +0.564374149, +0.949898720, +0.340726912, +0.193077028, +0.867426813, +0.214409351
541sample2 = getUnifRand(0., 1., nsam2)
542sample2
543+0.981604457, +0.895129144, +0.796080172, +0.819388270, +0.703278482, +0.733187795, +0.143012166, +0.456783950
544disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
545disKolm
546+0.464285731
547disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
548disKolm
549+0.464285731
550
551iweight1 = getUnifRand(0, 9, nsam1)
552iweight1
553+8, +2, +1, +9, +1, +1, +7
554rweight1 = iweight1
555disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
556disKolm
557+0.681034505
558disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
559disKolm
560+0.681034505
561disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
562disKolm
563+0.681034505
564
565iweight2 = getUnifRand(0, 9, nsam2)
566iweight2
567+4, +9, +8, +1, +6, +7, +0, +4
568rweight2 = iweight2
569disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
570disKolm
571+0.828470409
572disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
573disKolm
574+0.828470409
575disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
576disKolm
577+0.828470409
578
579nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
580sample1 = getUnifRand(0., 1., nsam1)
581sample1
582+0.224939585E-1, +0.322109163, +0.156076849, +0.416862130, +0.808478653, +0.774111092
583sample2 = getUnifRand(0., 1., nsam2)
584sample2
585+0.447691560, +0.662806749
586disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
587disKolm
588+0.666666687
589disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
590disKolm
591+0.666666687
592
593iweight1 = getUnifRand(0, 9, nsam1)
594iweight1
595+2, +4, +0, +5, +2, +2
596rweight1 = iweight1
597disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
598disKolm
599+0.733333349
600disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
601disKolm
602+0.733333349
603disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
604disKolm
605+0.733333349
606
607iweight2 = getUnifRand(0, 9, nsam2)
608iweight2
609+8, +2
610rweight2 = iweight2
611disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
612disKolm
613+0.733333349
614disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
615disKolm
616+0.733333349
617disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
618disKolm
619+0.733333349
620
621nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
622sample1 = getUnifRand(0., 1., nsam1)
623sample1
624+0.594986677E-1, +0.684767425
625sample2 = getUnifRand(0., 1., nsam2)
626sample2
627+0.238167524, +0.926029146, +0.310360432, +0.900197804, +0.823209882E-1, +0.863254547, +0.111911118, +0.103175223, +0.686266899
628disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
629disKolm
630+0.500000000
631disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
632disKolm
633+0.500000000
634
635iweight1 = getUnifRand(0, 9, nsam1)
636iweight1
637+0, +6
638rweight1 = iweight1
639disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
640disKolm
641+0.555555582
642disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
643disKolm
644+0.555555582
645disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
646disKolm
647+0.555555582
648
649iweight2 = getUnifRand(0, 9, nsam2)
650iweight2
651+8, +7, +3, +2, +5, +3, +9, +8, +8
652rweight2 = iweight2
653disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
654disKolm
655+0.622641504
656disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
657disKolm
658+0.622641563
659disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
660disKolm
661+0.622641563
662
663nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
664sample1 = getUnifRand(0., 1., nsam1)
665sample1
666+0.397371590, +0.938385129, +0.582003474
667sample2 = getUnifRand(0., 1., nsam2)
668sample2
669+0.505924284, +0.203758836, +0.269884109, +0.713609517, +0.544165671, +0.523903191
670disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
671disKolm
672+0.500000000
673disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
674disKolm
675+0.500000000
676
677iweight1 = getUnifRand(0, 9, nsam1)
678iweight1
679+0, +1, +0
680rweight1 = iweight1
681disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
682disKolm
683+1.00000000
684disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
685disKolm
686+1.00000000
687disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
688disKolm
689+1.00000000
690
691iweight2 = getUnifRand(0, 9, nsam2)
692iweight2
693+6, +1, +2, +8, +5, +9
694rweight2 = iweight2
695disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
696disKolm
697+1.00000000
698disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
699disKolm
700+1.00000000
701disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
702disKolm
703+1.00000000
704
705nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
706sample1 = getUnifRand(0., 1., nsam1)
707sample1
708+0.290899634, +0.850519896, +0.745059967, +0.838788748, +0.649232924, +0.784150898, +0.228091419, +0.319352806, +0.717170477
709sample2 = getUnifRand(0., 1., nsam2)
710sample2
711+0.626501799, +0.645529509, +0.309976399, +0.565434396, +0.774916589, +0.324674129, +0.894319952, +0.782673120, +0.364960313
712disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
713disKolm
714+0.333333343
715disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
716disKolm
717+0.333333343
718
719iweight1 = getUnifRand(0, 9, nsam1)
720iweight1
721+7, +3, +0, +7, +5, +6, +6, +0, +1
722rweight1 = iweight1
723disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
724disKolm
725+0.371428579
726disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
727disKolm
728+0.371428579
729disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
730disKolm
731+0.371428579
732
733iweight2 = getUnifRand(0, 9, nsam2)
734iweight2
735+0, +2, +4, +3, +6, +6, +5, +9, +0
736rweight2 = iweight2
737disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
738disKolm
739+0.371428579
740disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
741disKolm
742+0.371428579
743disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
744disKolm
745+0.371428579
746
747nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
748sample1 = getUnifRand(0., 1., nsam1)
749sample1
750+0.575938463, +0.951471746, +0.361542106E-1, +0.261676908, +0.294095874, +0.750689089
751sample2 = getUnifRand(0., 1., nsam2)
752sample2
753+0.842615366E-1, +0.163761497, +0.660615385, +0.335194826, +0.773403049E-1, +0.610877573, +0.174881756
754disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
755disKolm
756+0.404761910
757disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
758disKolm
759+0.404761910
760
761iweight1 = getUnifRand(0, 9, nsam1)
762iweight1
763+0, +9, +2, +9, +7, +2
764rweight1 = iweight1
765disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
766disKolm
767+0.502463102
768disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
769disKolm
770+0.502463102
771disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
772disKolm
773+0.502463102
774
775iweight2 = getUnifRand(0, 9, nsam2)
776iweight2
777+0, +6, +2, +5, +4, +7, +3
778rweight2 = iweight2
779disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
780disKolm
781+0.412515968
782disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
783disKolm
784+0.412515968
785disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
786disKolm
787+0.412515968
788
789nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
790sample1 = getUnifRand(0., 1., nsam1)
791sample1
792+0.676527619E-1, +0.728438616, +0.678963006, +0.787471056, +0.623467386, +0.760426283
793sample2 = getUnifRand(0., 1., nsam2)
794sample2
795+0.307199001, +0.732716084, +0.853345096, +0.127105117
796disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
797disKolm
798+0.333333313
799disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
800disKolm
801+0.333333313
802
803iweight1 = getUnifRand(0, 9, nsam1)
804iweight1
805+0, +7, +0, +3, +8, +0
806rweight1 = iweight1
807disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
808disKolm
809+0.500000000
810disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
811disKolm
812+0.500000000
813disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
814disKolm
815+0.500000000
816
817iweight2 = getUnifRand(0, 9, nsam2)
818iweight2
819+5, +1, +8, +2
820rweight2 = iweight2
821disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
822disKolm
823+0.500000000
824disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
825disKolm
826+0.500000000
827disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
828disKolm
829+0.500000000
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: