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.
See also
getProbKS
setProbKS


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.194639027
10disKolm = getDisKolm(sample1) ! assuming unweighted samples.
11disKolm
12+0.805360973
13disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
14disKolm
15+0.805360973
16disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
17disKolm
18+0.805360973
19disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
20disKolm
21+0.805360973
22
23iweight1 = getUnifRand(0, 9, nsam1)
24iweight1
25+5
26rweight1 = iweight1
27disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
28disKolm
29+0.805360973
30disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
31disKolm
32+0.805360973
33disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
34disKolm
35+0.805360973
36disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
37disKolm
38+0.805360973
39disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
40disKolm
41+0.805360973
42disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
43disKolm
44+0.805360973
45
46nsam1 = getUnifRand(0, 10)
47sample1 = getUnifRand(0., 1., nsam1)
48sample1
49+0.545369804, +0.140653133
50disKolm = getDisKolm(sample1) ! assuming unweighted samples.
51disKolm
52+0.454630196
53disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
54disKolm
55+0.454630196
56disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
57disKolm
58+0.454630196
59disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
60disKolm
61+0.454630196
62
63iweight1 = getUnifRand(0, 9, nsam1)
64iweight1
65+8, +1
66rweight1 = iweight1
67disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
68disKolm
69+0.454630196
70disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
71disKolm
72+0.454630196
73disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
74disKolm
75+0.454630196
76disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
77disKolm
78+0.454630196
79disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
80disKolm
81+0.454630196
82disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
83disKolm
84+0.454630196
85
86nsam1 = getUnifRand(0, 10)
87sample1 = getUnifRand(0., 1., nsam1)
88sample1
89+0.190912664, +0.834628999, +0.150775015, +0.144199193, +0.590845406, +0.857549489, +0.469593167, +0.945006430, +0.626998365, +0.987677157
90disKolm = getDisKolm(sample1) ! assuming unweighted samples.
91disKolm
92+0.234628975
93disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
94disKolm
95+0.234628975
96disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
97disKolm
98+0.234628975
99disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
100disKolm
101+0.234628975
102
103iweight1 = getUnifRand(0, 9, nsam1)
104iweight1
105+4, +5, +9, +3, +2, +6, +3, +7, +3, +4
106rweight1 = iweight1
107disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
108disKolm
109+0.312889874
110disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
111disKolm
112+0.312889874
113disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
114disKolm
115+0.312889874
116disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
117disKolm
118+0.312889874
119disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
120disKolm
121+0.312889874
122disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
123disKolm
124+0.312889874
125
126nsam1 = getUnifRand(0, 10)
127sample1 = getUnifRand(0., 1., nsam1)
128sample1
129+0.880253792, +0.631350219
130disKolm = getDisKolm(sample1) ! assuming unweighted samples.
131disKolm
132+0.631350219
133disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
134disKolm
135+0.631350219
136disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
137disKolm
138+0.631350219
139disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
140disKolm
141+0.631350219
142
143iweight1 = getUnifRand(0, 9, nsam1)
144iweight1
145+5, +4
146rweight1 = iweight1
147disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
148disKolm
149+0.631350219
150disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
151disKolm
152+0.631350219
153disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
154disKolm
155+0.631350219
156disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
157disKolm
158+0.631350219
159disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
160disKolm
161+0.631350219
162disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
163disKolm
164+0.631350219
165
166nsam1 = getUnifRand(0, 10)
167sample1 = getUnifRand(0., 1., nsam1)
168sample1
169
170disKolm = getDisKolm(sample1) ! assuming unweighted samples.
171disKolm
172+0.00000000
173disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
174disKolm
175+0.00000000
176disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
177disKolm
178+0.00000000
179disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
180disKolm
181+0.00000000
182
183iweight1 = getUnifRand(0, 9, nsam1)
184iweight1
185
186rweight1 = iweight1
187disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
188disKolm
189+0.00000000
190disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
191disKolm
192+0.00000000
193disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
194disKolm
195+0.00000000
196disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
197disKolm
198+0.00000000
199disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
200disKolm
201+0.00000000
202disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
203disKolm
204+0.00000000
205
206nsam1 = getUnifRand(0, 10)
207sample1 = getUnifRand(0., 1., nsam1)
208sample1
209+0.576200485E-1
210disKolm = getDisKolm(sample1) ! assuming unweighted samples.
211disKolm
212+0.942379951
213disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
214disKolm
215+0.942379951
216disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
217disKolm
218+0.942379951
219disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
220disKolm
221+0.942379951
222
223iweight1 = getUnifRand(0, 9, nsam1)
224iweight1
225+1
226rweight1 = iweight1
227disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
228disKolm
229+0.942379951
230disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
231disKolm
232+0.942379951
233disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
234disKolm
235+0.942379951
236disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
237disKolm
238+0.942379951
239disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
240disKolm
241+0.942379951
242disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
243disKolm
244+0.942379951
245
246nsam1 = getUnifRand(0, 10)
247sample1 = getUnifRand(0., 1., nsam1)
248sample1
249
250disKolm = getDisKolm(sample1) ! assuming unweighted samples.
251disKolm
252+0.00000000
253disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
254disKolm
255+0.00000000
256disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
257disKolm
258+0.00000000
259disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
260disKolm
261+0.00000000
262
263iweight1 = getUnifRand(0, 9, nsam1)
264iweight1
265
266rweight1 = iweight1
267disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
268disKolm
269+0.00000000
270disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
271disKolm
272+0.00000000
273disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
274disKolm
275+0.00000000
276disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
277disKolm
278+0.00000000
279disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
280disKolm
281+0.00000000
282disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
283disKolm
284+0.00000000
285
286nsam1 = getUnifRand(0, 10)
287sample1 = getUnifRand(0., 1., nsam1)
288sample1
289+0.441453099, +0.434049487, +0.448442817, +0.622417331E-1, +0.228081524, +0.126357734, +0.328559339, +0.991577804, +0.391845405, +0.744467795
290disKolm = getDisKolm(sample1) ! assuming unweighted samples.
291disKolm
292+0.351557195
293disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
294disKolm
295+0.351557195
296disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
297disKolm
298+0.351557195
299disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
300disKolm
301+0.351557195
302
303iweight1 = getUnifRand(0, 9, nsam1)
304iweight1
305+1, +7, +6, +9, +8, +7, +9, +5, +1, +7
306rweight1 = iweight1
307disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
308disKolm
309+0.351557255
310disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
311disKolm
312+0.351557255
313disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
314disKolm
315+0.351557255
316disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
317disKolm
318+0.351557255
319disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
320disKolm
321+0.351557255
322disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
323disKolm
324+0.351557255
325
326nsam1 = getUnifRand(0, 10)
327sample1 = getUnifRand(0., 1., nsam1)
328sample1
329+0.337683737, +0.999534667, +0.712515473, +0.573265731, +0.730983138, +0.582617462, +0.658146858, +0.319438398, +0.740698159, +0.625544250
330disKolm = getDisKolm(sample1) ! assuming unweighted samples.
331disKolm
332+0.373265743
333disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
334disKolm
335+0.373265743
336disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
337disKolm
338+0.373265743
339disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
340disKolm
341+0.373265743
342
343iweight1 = getUnifRand(0, 9, nsam1)
344iweight1
345+2, +9, +2, +2, +6, +4, +1, +5, +8, +6
346rweight1 = iweight1
347disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
348disKolm
349+0.417710185
350disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
351disKolm
352+0.417710185
353disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
354disKolm
355+0.417710185
356disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
357disKolm
358+0.417710185
359disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
360disKolm
361+0.417710185
362disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
363disKolm
364+0.417710185
365
366nsam1 = getUnifRand(0, 10)
367sample1 = getUnifRand(0., 1., nsam1)
368sample1
369+0.630301297, +0.670536816, +0.715096951, +0.109203219, +0.582411468, +0.129118264
370disKolm = getDisKolm(sample1) ! assuming unweighted samples.
371disKolm
372+0.284903049
373disKolm = getDisKolm(sample1, getUnifCDF_RKS) ! assuming unweighted samples.
374disKolm
375+0.284903049
376disKolm = getDisKolm(getSorted(sample1), ascending) ! assuming unweighted samples.
377disKolm
378+0.284903049
379disKolm = getDisKolm(getSorted(sample1), getUnifCDF_RKS, ascending) ! assuming unweighted samples.
380disKolm
381+0.284903049
382
383iweight1 = getUnifRand(0, 9, nsam1)
384iweight1
385+8, +5, +1, +1, +2, +5
386rweight1 = iweight1
387disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)))
388disKolm
389+0.309684187
390disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getUnifCDF_RKS)
391disKolm
392+0.309684187
393disKolm = getDisKolm(sample1, iweight1, sum(iweight1))
394disKolm
395+0.309684187
396disKolm = getDisKolm(sample1, iweight1, sum(iweight1), getUnifCDF_RKS)
397disKolm
398+0.309684187
399disKolm = getDisKolm(sample1, rweight1, sum(rweight1))
400disKolm
401+0.309684187
402disKolm = getDisKolm(sample1, rweight1, sum(rweight1), getUnifCDF_RKS)
403disKolm
404+0.309684187
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.168564260, +0.549820065E-1
415sample2 = getUnifRand(0., 1., nsam2)
416sample2
417+0.430936217E-1, +0.255195260, +0.514090896, +0.355111361E-1, +0.519169927, +0.887716413
418disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
419disKolm
420+0.666666627
421disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
422disKolm
423+0.666666627
424
425iweight1 = getUnifRand(0, 9, nsam1)
426iweight1
427+5, +1
428rweight1 = iweight1
429disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
430disKolm
431+0.666666627
432disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
433disKolm
434+0.666666627
435disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
436disKolm
437+0.666666627
438
439iweight2 = getUnifRand(0, 9, nsam2)
440iweight2
441+1, +9, +1, +7, +0, +8
442rweight2 = iweight2
443disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
444disKolm
445+0.692307711
446disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
447disKolm
448+0.692307711
449disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
450disKolm
451+0.692307711
452
453nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
454sample1 = getUnifRand(0., 1., nsam1)
455sample1
456+0.551009178E-2, +0.845844924, +0.199587941E-1, +0.243314981, +0.467586756
457sample2 = getUnifRand(0., 1., nsam2)
458sample2
459
460disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
461disKolm
462+0.00000000
463disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
464disKolm
465+0.00000000
466
467iweight1 = getUnifRand(0, 9, nsam1)
468iweight1
469+8, +5, +2, +5, +2
470rweight1 = iweight1
471disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
472disKolm
473+0.00000000
474disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
475disKolm
476+0.00000000
477disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
478disKolm
479+0.00000000
480
481iweight2 = getUnifRand(0, 9, nsam2)
482iweight2
483
484rweight2 = iweight2
485disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
486disKolm
487+0.00000000
488disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
489disKolm
490+0.00000000
491disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
492disKolm
493+0.00000000
494
495nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
496sample1 = getUnifRand(0., 1., nsam1)
497sample1
498+0.968986869, +0.892931283, +0.649444222, +0.350683331, +0.168000519, +0.788962305, +0.689557016
499sample2 = getUnifRand(0., 1., nsam2)
500sample2
501+0.984813869, +0.672165096, +0.870108485
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+9, +5, +6, +8, +6, +6, +5
512rweight1 = iweight1
513disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
514disKolm
515+0.444444448
516disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
517disKolm
518+0.444444478
519disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
520disKolm
521+0.444444478
522
523iweight2 = getUnifRand(0, 9, nsam2)
524iweight2
525+0, +8, +5
526rweight2 = iweight2
527disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
528disKolm
529+0.444444448
530disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
531disKolm
532+0.444444478
533disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
534disKolm
535+0.444444478
536
537nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
538sample1 = getUnifRand(0., 1., nsam1)
539sample1
540
541sample2 = getUnifRand(0., 1., nsam2)
542sample2
543+0.258402228E-1, +0.812570453E-1, +0.934010744E-2, +0.465916872, +0.211183190, +0.160584450
544disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
545disKolm
546+0.00000000
547disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
548disKolm
549+0.00000000
550
551iweight1 = getUnifRand(0, 9, nsam1)
552iweight1
553
554rweight1 = iweight1
555disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
556disKolm
557+0.00000000
558disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
559disKolm
560+0.00000000
561disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
562disKolm
563+0.00000000
564
565iweight2 = getUnifRand(0, 9, nsam2)
566iweight2
567+9, +8, +2, +1, +5, +4
568rweight2 = iweight2
569disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
570disKolm
571+0.00000000
572disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
573disKolm
574+0.00000000
575disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
576disKolm
577+0.00000000
578
579nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
580sample1 = getUnifRand(0., 1., nsam1)
581sample1
582+0.840878904, +0.445194244E-1, +0.738602459, +0.640565872, +0.615369141, +0.233224154, +0.215224266
583sample2 = getUnifRand(0., 1., nsam2)
584sample2
585+0.889613152, +0.535015821
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, +8, +3, +1, +5, +7, +0
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+8, +9
610rweight2 = iweight2
611disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
612disKolm
613+0.483870953
614disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
615disKolm
616+0.483870953
617disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
618disKolm
619+0.483870953
620
621nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
622sample1 = getUnifRand(0., 1., nsam1)
623sample1
624+0.516687870, +0.517131209, +0.249935150, +0.571817279, +0.348438025E-1, +0.293173969, +0.922803283
625sample2 = getUnifRand(0., 1., nsam2)
626sample2
627+0.695454121, +0.517437041, +0.850062490, +0.586457372, +0.730632424, +0.454817712
628disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
629disKolm
630+0.547619045
631disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
632disKolm
633+0.547619045
634
635iweight1 = getUnifRand(0, 9, nsam1)
636iweight1
637+0, +9, +7, +1, +1, +5, +3
638rweight1 = iweight1
639disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
640disKolm
641+0.679487169
642disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
643disKolm
644+0.679487169
645disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
646disKolm
647+0.679487169
648
649iweight2 = getUnifRand(0, 9, nsam2)
650iweight2
651+7, +3, +5, +1, +0, +2
652rweight2 = iweight2
653disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
654disKolm
655+0.735042751
656disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
657disKolm
658+0.735042751
659disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
660disKolm
661+0.735042751
662
663nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
664sample1 = getUnifRand(0., 1., nsam1)
665sample1
666+0.409337640, +0.486655056, +0.673640907, +0.284386933, +0.700790823, +0.143620551
667sample2 = getUnifRand(0., 1., nsam2)
668sample2
669+0.981227636, +0.727312505, +0.637786865, +0.233378410E-1, +0.990249157, +0.913604677, +0.897146285, +0.237520874, +0.821852088E-1
670disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
671disKolm
672+0.555555582
673disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
674disKolm
675+0.555555582
676
677iweight1 = getUnifRand(0, 9, nsam1)
678iweight1
679+8, +9, +8, +3, +0, +1
680rweight1 = iweight1
681disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
682disKolm
683+0.555555582
684disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
685disKolm
686+0.555555582
687disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
688disKolm
689+0.555555582
690
691iweight2 = getUnifRand(0, 9, nsam2)
692iweight2
693+9, +1, +5, +9, +5, +3, +6, +4, +7
694rweight2 = iweight2
695disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
696disKolm
697+0.489795923
698disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
699disKolm
700+0.489795923
701disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
702disKolm
703+0.489795923
704
705nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
706sample1 = getUnifRand(0., 1., nsam1)
707sample1
708+0.568476915, +0.706542611, +0.770734072, +0.240142703, +0.890774131E-1, +0.389372945, +0.377652586, +0.441982448
709sample2 = getUnifRand(0., 1., nsam2)
710sample2
711+0.596845925, +0.766611695, +0.541405261, +0.443778396, +0.224542439
712disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
713disKolm
714+0.425000012
715disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
716disKolm
717+0.425000012
718
719iweight1 = getUnifRand(0, 9, nsam1)
720iweight1
721+6, +1, +7, +7, +4, +9, +4, +5
722rweight1 = iweight1
723disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
724disKolm
725+0.474418640
726disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
727disKolm
728+0.474418581
729disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
730disKolm
731+0.474418581
732
733iweight2 = getUnifRand(0, 9, nsam2)
734iweight2
735+4, +2, +8, +7, +3
736rweight2 = iweight2
737disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
738disKolm
739+0.549418628
740disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
741disKolm
742+0.549418569
743disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
744disKolm
745+0.549418569
746
747nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
748sample1 = getUnifRand(0., 1., nsam1)
749sample1
750+0.169377804, +0.182534456E-1, +0.146766424
751sample2 = getUnifRand(0., 1., nsam2)
752sample2
753+0.700174689, +0.644448459, +0.820686638, +0.637253225, +0.216747820, +0.122719526
754disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
755disKolm
756+0.833333313
757disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
758disKolm
759+0.833333313
760
761iweight1 = getUnifRand(0, 9, nsam1)
762iweight1
763+9, +9, +1
764rweight1 = iweight1
765disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
766disKolm
767+0.833333313
768disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
769disKolm
770+0.833333313
771disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
772disKolm
773+0.833333313
774
775iweight2 = getUnifRand(0, 9, nsam2)
776iweight2
777+6, +9, +8, +5, +5, +8
778rweight2 = iweight2
779disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
780disKolm
781+0.804878056
782disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
783disKolm
784+0.804878056
785disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
786disKolm
787+0.804878056
788
789nsam1 = getUnifRand(0, 10); nsam2 = getUnifRand(0, 10)
790sample1 = getUnifRand(0., 1., nsam1)
791sample1
792
793sample2 = getUnifRand(0., 1., nsam2)
794sample2
795+0.131634533, +0.174845815, +0.167965651, +0.182466149, +0.971214771, +0.355251074, +0.665331423, +0.952193439, +0.242585123, +0.152673066
796disKolm = getDisKolm(sample1, sample2) ! assuming unweighted samples.
797disKolm
798+0.00000000
799disKolm = getDisKolm(getSorted(sample1), getSorted(sample2), ascending) ! assuming unweighted samples.
800disKolm
801+0.00000000
802
803iweight1 = getUnifRand(0, 9, nsam1)
804iweight1
805
806rweight1 = iweight1
807disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), sample2)
808disKolm
809+0.00000000
810disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2)
811disKolm
812+0.00000000
813disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2)
814disKolm
815+0.00000000
816
817iweight2 = getUnifRand(0, 9, nsam2)
818iweight2
819+2, +4, +4, +4, +1, +2, +1, +3, +3, +0
820rweight2 = iweight2
821disKolm = getDisKolm(getVerbose(sample1, iweight1, sum(iweight1)), getVerbose(sample2, iweight2, sum(iweight2)))
822disKolm
823+0.00000000
824disKolm = getDisKolm(sample1, iweight1, sum(iweight1), sample2, iweight2, sum(iweight2))
825disKolm
826+0.00000000
827disKolm = getDisKolm(sample1, rweight1, sum(rweight1), sample2, rweight2, sum(rweight2))
828disKolm
829+0.00000000
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 216 of file pm_distanceKolm.F90.


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