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

Compute and return the Cordance vector of the input data series x and y.
More...

Detailed Description

Compute and return the Cordance vector of the input data series x and y.

See the documentation of pm_sampleCor for the definition of sample cordance.

Parameters
[out]concordance: The output scalar of type integer of default kind IK, containing the number of concordant pairs in the sample.
(optional. It must be present if and only if the output argument cordance is missing.)
[out]discordance: The output scalar of type integer of default kind IK, containing the number of discordant pairs in the sample.
(optional. It must be present if and only if the output argument cordance is missing.)
[out]cordance: The output scalar of type integer of default kind IK, containing the number of concordant minus discordant pairs in the sample.
(optional. It must be present if and only if the output arguments concordance and discordance are both missing.)
[out]tiedx: The output scalar of type integer of default kind IK, containing the number of pairs whose x corresponding values are equal (tied).
[out]tiedy: The output scalar of type integer of default kind IK, containing the number of pairs whose y corresponding values are equal (tied).
[in]x: The input contiguous vector of shape (nsam) of,
  1. type character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU),
  2. type integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64),
  3. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
  4. type string container css_type,
  5. type string PDT container css_pdt,
or scalar character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU) of arbitrary length type parameter, containing the first attribute x of the observational sample, where nsam is the number of observations in the sample.
[in]y: The input contiguous vector of shape (nsam) of the same type and kind as x, containing the second attribute y of the observational sample, where nsam is the number of observations in the sample.


Possible calling interfaces

call setCordance(cordance, tiedx, tiedy, x, y)
call setCordance(concordance, discordance, tiedx, tiedy, x, y)
Compute and return the Cordance vector of the input data series x and y.
This module contains classes and procedures for computing properties related to the correlation matri...
Warning
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
getCor
setCor


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_io, only: display_type
5 use pm_distUnif, only: getUnifRand
8 use pm_arrayRange, only: getRange
9 use pm_sampleCor, only: css_type
10 use pm_sampleCor, only: uppDia
11 use pm_sampleCor, only: lowDia
12
13 implicit none
14
15 integer(IK) :: itry, ntry = 15
16 type(display_type) :: disp
17 disp = display_type(file = "main.out.F90")
18
19 call disp%skip()
20 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
21 call disp%show("!Compute the cordance of two random string containers.")
22 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
23 call disp%skip()
24
25 block
26 integer(IK) :: nsam, cordance, concordance, discordance, tiedx, tiedy
27 type(css_type), allocatable :: x(:), y(:)
28 do itry = 1, 2
29 call disp%skip()
30 call disp%show("nsam = getUnifRand(0, 20)")
31 nsam = getUnifRand(0, 20)
32 call disp%show("nsam")
33 call disp%show( nsam )
34 call disp%show("x = css_type([character(10) :: 'ParaMonte', 'is', 'a', 'Monte', 'Carlo', 'and', 'Machine', 'Learning', 'library', '.'])")
35 x = css_type([character(10) :: 'ParaMonte', 'is', 'a', 'Monte', 'Carlo', 'and', 'Machine', 'Learning', 'library', '.'])
36 call disp%show("x")
37 call disp%show( x , deliml = SK_'''' )
38 call disp%show("y = getShuffled(x)")
39 y = getShuffled(x)
40 call disp%show("y")
41 call disp%show( y , deliml = SK_'''' )
42 call disp%show("call setCordance(cordance, tiedx, tiedy, x, y)")
43 call setCordance(cordance, tiedx, tiedy, x, y)
44 call disp%show("[cordance, tiedx, tiedy]")
45 call disp%show( [cordance, tiedx, tiedy] )
46 call disp%show("call setCordance(concordance, discordance, tiedx, tiedy, x, y)")
47 call setCordance(concordance, discordance, tiedx, tiedy, x, y)
48 call disp%show("[concordance, discordance, tiedx, tiedy]")
49 call disp%show( [concordance, discordance, tiedx, tiedy] )
50 call disp%show("if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'")
51 if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
52 call disp%skip()
53 end do
54 end block
55
56 call disp%skip()
57 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
58 call disp%show("!Compute the cordance of two random character strings.")
59 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
60 call disp%skip()
61
62 block
63 integer(IK) :: nsam, cordance, concordance, discordance, tiedx, tiedy
64 character(:), allocatable :: x, y
65 do itry = 1, ntry
66 call disp%skip()
67 call disp%show("nsam = getUnifRand(0, 20)")
68 nsam = getUnifRand(0, 20)
69 call disp%show("nsam")
70 call disp%show( nsam )
71 call disp%show("x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))")
72 x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
73 call disp%show("x")
74 call disp%show( x , deliml = SK_'''' )
75 call disp%show("y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))")
76 y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
77 call disp%show("y")
78 call disp%show( y , deliml = SK_'''' )
79 call disp%show("call setCordance(cordance, tiedx, tiedy, x, y)")
80 call setCordance(cordance, tiedx, tiedy, x, y)
81 call disp%show("[cordance, tiedx, tiedy]")
82 call disp%show( [cordance, tiedx, tiedy] )
83 call disp%show("call setCordance(concordance, discordance, tiedx, tiedy, x, y)")
84 call setCordance(concordance, discordance, tiedx, tiedy, x, y)
85 call disp%show("[concordance, discordance, tiedx, tiedy]")
86 call disp%show( [concordance, discordance, tiedx, tiedy] )
87 call disp%show("if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'")
88 if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
89 call disp%skip()
90 end do
91 end block
92
93 call disp%skip()
94 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
95 call disp%show("!Compute the cordance of two random character vectors.")
96 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
97 call disp%skip()
98
99 block
100 integer(IK) :: nsam, cordance, concordance, discordance, tiedx, tiedy
101 character(2), allocatable :: x(:), y(:)
102 do itry = 1, ntry
103 call disp%skip()
104 call disp%show("nsam = getUnifRand(0, 20)")
105 nsam = getUnifRand(0, 20)
106 call disp%show("nsam")
107 call disp%show( nsam )
108 call disp%show("x = getUnifRand('AA', 'ZZ', nsam)")
109 x = getUnifRand('AA', 'ZZ', nsam)
110 call disp%show("x")
111 call disp%show( x , deliml = SK_'''' )
112 call disp%show("y = getUnifRand('AA', 'ZZ', nsam)")
113 y = getUnifRand('AA', 'ZZ', nsam)
114 call disp%show("y")
115 call disp%show( y , deliml = SK_'''' )
116 call disp%show("call setCordance(cordance, tiedx, tiedy, x, y)")
117 call setCordance(cordance, tiedx, tiedy, x, y)
118 call disp%show("[cordance, tiedx, tiedy]")
119 call disp%show( [cordance, tiedx, tiedy] )
120 call disp%show("call setCordance(concordance, discordance, tiedx, tiedy, x, y)")
121 call setCordance(concordance, discordance, tiedx, tiedy, x, y)
122 call disp%show("[concordance, discordance, tiedx, tiedy]")
123 call disp%show( [concordance, discordance, tiedx, tiedy] )
124 call disp%show("if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'")
125 if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
126 call disp%skip()
127 end do
128 end block
129
130 call disp%skip()
131 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
132 call disp%show("!Compute the cordance of two random integer vectors.")
133 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
134 call disp%skip()
135
136 block
137 use pm_kind, only: TKG => IK ! All processor kinds are supported.
138 integer(IK) :: nsam, cordance, concordance, discordance, tiedx, tiedy
139 integer(TKG), allocatable :: x(:), y(:)
140 do itry = 1, ntry
141 call disp%skip()
142 call disp%show("nsam = getUnifRand(0, 20)")
143 nsam = getUnifRand(0, 20)
144 call disp%show("nsam")
145 call disp%show( nsam )
146 call disp%show("x = getUnifRand(1, nsam, nsam)")
147 x = getUnifRand(1, nsam, nsam)
148 call disp%show("x")
149 call disp%show( x )
150 call disp%show("y = getUnifRand(1, nsam, nsam)")
151 y = getUnifRand(1, nsam, nsam)
152 call disp%show("y")
153 call disp%show( y )
154 call disp%show("call setCordance(cordance, tiedx, tiedy, x, y)")
155 call setCordance(cordance, tiedx, tiedy, x, y)
156 call disp%show("[cordance, tiedx, tiedy]")
157 call disp%show( [cordance, tiedx, tiedy] )
158 call disp%show("call setCordance(concordance, discordance, tiedx, tiedy, x, y)")
159 call setCordance(concordance, discordance, tiedx, tiedy, x, y)
160 call disp%show("[concordance, discordance, tiedx, tiedy]")
161 call disp%show( [concordance, discordance, tiedx, tiedy] )
162 call disp%show("if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'")
163 if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
164 call disp%skip()
165 end do
166 end block
167
168 call disp%skip()
169 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
170 call disp%show("!Compute the cordance of two random real vectors.")
171 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
172 call disp%skip()
173
174 block
175 use pm_kind, only: TKG => IK ! All processor kinds are supported.
176 integer(IK) :: nsam, cordance, concordance, discordance, tiedx, tiedy
177 real(TKG), allocatable :: x(:), y(:)
178 do itry = 1, ntry
179 call disp%skip()
180 call disp%show("nsam = getUnifRand(0, 20)")
181 nsam = getUnifRand(0, 20)
182 call disp%show("nsam")
183 call disp%show( nsam )
184 call disp%show("x = getUnifRand(1, nsam, nsam)")
185 x = getUnifRand(1, nsam, nsam)
186 call disp%show("x")
187 call disp%show( x )
188 call disp%show("y = getUnifRand(1, nsam, nsam)")
189 y = getUnifRand(1, nsam, nsam)
190 call disp%show("y")
191 call disp%show( y )
192 call disp%show("call setCordance(cordance, tiedx, tiedy, x, y)")
193 call setCordance(cordance, tiedx, tiedy, x, y)
194 call disp%show("[cordance, tiedx, tiedy]")
195 call disp%show( [cordance, tiedx, tiedy] )
196 call disp%show("call setCordance(concordance, discordance, tiedx, tiedy, x, y)")
197 call setCordance(concordance, discordance, tiedx, tiedy, x, y)
198 call disp%show("[concordance, discordance, tiedx, tiedy]")
199 call disp%show( [concordance, discordance, tiedx, tiedy] )
200 call disp%show("if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'")
201 if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
202 call disp%skip()
203 end do
204 end block
205
206end program example
Generate minimally-spaced character, integer, real sequences or sequences at fixed intervals of size ...
Perform an unbiased random shuffling of the input array, known as the Knuth or Fisher-Yates shuffle,...
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 generating ranges of discrete character,...
This module contains procedures and generic interfaces for shuffling arrays of various types.
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 LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
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
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 cordance of two random string containers.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7nsam = getUnifRand(0, 20)
8nsam
9+2
10x = css_type([character(10) :: 'ParaMonte', 'is', 'a', 'Monte', 'Carlo', 'and', 'Machine', 'Learning', 'library', '.'])
11x
12'ParaMonte', 'is', 'a', 'Monte', 'Carlo', 'and', 'Machine', 'Learning', 'library', '.'
13y = getShuffled(x)
14y
15'is', 'and', 'Carlo', 'a', 'Machine', 'ParaMonte', 'library', 'Learning', 'Monte', '.'
16call setCordance(cordance, tiedx, tiedy, x, y)
17[cordance, tiedx, tiedy]
18+17, +0, +0
19call setCordance(concordance, discordance, tiedx, tiedy, x, y)
20[concordance, discordance, tiedx, tiedy]
21+31, +14, +0, +0
22if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
23
24
25nsam = getUnifRand(0, 20)
26nsam
27+17
28x = css_type([character(10) :: 'ParaMonte', 'is', 'a', 'Monte', 'Carlo', 'and', 'Machine', 'Learning', 'library', '.'])
29x
30'ParaMonte', 'is', 'a', 'Monte', 'Carlo', 'and', 'Machine', 'Learning', 'library', '.'
31y = getShuffled(x)
32y
33'library', 'a', 'Monte', 'ParaMonte', '.', 'is', 'Learning', 'Machine', 'and', 'Carlo'
34call setCordance(cordance, tiedx, tiedy, x, y)
35[cordance, tiedx, tiedy]
36+15, +0, +0
37call setCordance(concordance, discordance, tiedx, tiedy, x, y)
38[concordance, discordance, tiedx, tiedy]
39+30, +15, +0, +0
40if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
41
42
43!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44!Compute the cordance of two random character strings.
45!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46
47
48nsam = getUnifRand(0, 20)
49nsam
50+1
51x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
52x
53'R'
54y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
55y
56'U'
57call setCordance(cordance, tiedx, tiedy, x, y)
58[cordance, tiedx, tiedy]
59+0, +0, +0
60call setCordance(concordance, discordance, tiedx, tiedy, x, y)
61[concordance, discordance, tiedx, tiedy]
62+0, +0, +0, +0
63if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
64
65
66nsam = getUnifRand(0, 20)
67nsam
68+19
69x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
70x
71'FRIGFKYRNBCIKGJGHGM'
72y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
73y
74'VJYEGMCKALGLCUXQJEM'
75call setCordance(cordance, tiedx, tiedy, x, y)
76[cordance, tiedx, tiedy]
77-4, +10, +6
78call setCordance(concordance, discordance, tiedx, tiedy, x, y)
79[concordance, discordance, tiedx, tiedy]
80+76, +80, +10, +6
81if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
82
83
84nsam = getUnifRand(0, 20)
85nsam
86+12
87x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
88x
89'HABNDSGYHZKU'
90y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
91y
92'GEPKEIPJWKEU'
93call setCordance(cordance, tiedx, tiedy, x, y)
94[cordance, tiedx, tiedy]
95-16, +1, +5
96call setCordance(concordance, discordance, tiedx, tiedy, x, y)
97[concordance, discordance, tiedx, tiedy]
98+22, +38, +1, +5
99if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
100
101
102nsam = getUnifRand(0, 20)
103nsam
104+20
105x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
106x
107'HXPWMGSTMIWUKEYMSIES'
108y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
109y
110'CBZCUSZGTOFGNMLLOFYL'
111call setCordance(cordance, tiedx, tiedy, x, y)
112[cordance, tiedx, tiedy]
113-9, +9, +8
114call setCordance(concordance, discordance, tiedx, tiedy, x, y)
115[concordance, discordance, tiedx, tiedy]
116+82, +91, +9, +8
117if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
118
119
120nsam = getUnifRand(0, 20)
121nsam
122+15
123x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
124x
125'HOENGZQIXTEUHPR'
126y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
127y
128'QAMYWMCIKUAHGDS'
129call setCordance(cordance, tiedx, tiedy, x, y)
130[cordance, tiedx, tiedy]
131+19, +2, +2
132call setCordance(concordance, discordance, tiedx, tiedy, x, y)
133[concordance, discordance, tiedx, tiedy]
134+60, +41, +2, +2
135if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
136
137
138nsam = getUnifRand(0, 20)
139nsam
140+8
141x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
142x
143'NFJQEATI'
144y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
145y
146'NKSKXEAC'
147call setCordance(cordance, tiedx, tiedy, x, y)
148[cordance, tiedx, tiedy]
149+13, +0, +1
150call setCordance(concordance, discordance, tiedx, tiedy, x, y)
151[concordance, discordance, tiedx, tiedy]
152+20, +7, +0, +1
153if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
154
155
156nsam = getUnifRand(0, 20)
157nsam
158+2
159x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
160x
161'NI'
162y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
163y
164'GN'
165call setCordance(cordance, tiedx, tiedy, x, y)
166[cordance, tiedx, tiedy]
167-1, +0, +0
168call setCordance(concordance, discordance, tiedx, tiedy, x, y)
169[concordance, discordance, tiedx, tiedy]
170+0, +1, +0, +0
171if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
172
173
174nsam = getUnifRand(0, 20)
175nsam
176+2
177x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
178x
179'HQ'
180y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
181y
182'MZ'
183call setCordance(cordance, tiedx, tiedy, x, y)
184[cordance, tiedx, tiedy]
185-1, +0, +0
186call setCordance(concordance, discordance, tiedx, tiedy, x, y)
187[concordance, discordance, tiedx, tiedy]
188+0, +1, +0, +0
189if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
190
191
192nsam = getUnifRand(0, 20)
193nsam
194+14
195x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
196x
197'XDDMSMQBQFHZFR'
198y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
199y
200'ACUODWFBUTCNSW'
201call setCordance(cordance, tiedx, tiedy, x, y)
202[cordance, tiedx, tiedy]
203-22, +4, +3
204call setCordance(concordance, discordance, tiedx, tiedy, x, y)
205[concordance, discordance, tiedx, tiedy]
206+31, +53, +4, +3
207if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
208
209
210nsam = getUnifRand(0, 20)
211nsam
212+13
213x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
214x
215'AFYHNCQYBCOOV'
216y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
217y
218'ZASKSIXEBFWVQ'
219call setCordance(cordance, tiedx, tiedy, x, y)
220[cordance, tiedx, tiedy]
221+0, +3, +1
222call setCordance(concordance, discordance, tiedx, tiedy, x, y)
223[concordance, discordance, tiedx, tiedy]
224+37, +37, +3, +1
225if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
226
227
228nsam = getUnifRand(0, 20)
229nsam
230+5
231x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
232x
233'MPWLM'
234y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
235y
236'LHKGJ'
237call setCordance(cordance, tiedx, tiedy, x, y)
238[cordance, tiedx, tiedy]
239+3, +1, +0
240call setCordance(concordance, discordance, tiedx, tiedy, x, y)
241[concordance, discordance, tiedx, tiedy]
242+6, +3, +1, +0
243if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
244
245
246nsam = getUnifRand(0, 20)
247nsam
248+9
249x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
250x
251'AAZHZOOHK'
252y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
253y
254'INVNKJTEE'
255call setCordance(cordance, tiedx, tiedy, x, y)
256[cordance, tiedx, tiedy]
257+12, +4, +2
258call setCordance(concordance, discordance, tiedx, tiedy, x, y)
259[concordance, discordance, tiedx, tiedy]
260+21, +9, +4, +2
261if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
262
263
264nsam = getUnifRand(0, 20)
265nsam
266+17
267x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
268x
269'TLAXVQYOQHGODCWOK'
270y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
271y
272'SPZKKWBNFIPCZGOMP'
273call setCordance(cordance, tiedx, tiedy, x, y)
274[cordance, tiedx, tiedy]
275+13, +4, +5
276call setCordance(concordance, discordance, tiedx, tiedy, x, y)
277[concordance, discordance, tiedx, tiedy]
278+70, +57, +4, +5
279if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
280
281
282nsam = getUnifRand(0, 20)
283nsam
284+20
285x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
286x
287'IRLNOXTEZUAGYXLIDNWW'
288y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
289y
290'LVDBKEXKLPMYLTYUFAFS'
291call setCordance(cordance, tiedx, tiedy, x, y)
292[cordance, tiedx, tiedy]
293-19, +5, +6
294call setCordance(concordance, discordance, tiedx, tiedy, x, y)
295[concordance, discordance, tiedx, tiedy]
296+80, +99, +5, +6
297if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
298
299
300nsam = getUnifRand(0, 20)
301nsam
302+7
303x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
304x
305'JPNOLDK'
306y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
307y
308'XWIAHRE'
309call setCordance(cordance, tiedx, tiedy, x, y)
310[cordance, tiedx, tiedy]
311+11, +0, +0
312call setCordance(concordance, discordance, tiedx, tiedy, x, y)
313[concordance, discordance, tiedx, tiedy]
314+16, +5, +0, +0
315if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
316
317
318!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
319!Compute the cordance of two random character vectors.
320!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
321
322
323nsam = getUnifRand(0, 20)
324nsam
325+3
326x = getUnifRand('AA', 'ZZ', nsam)
327x
328'OO', 'UJ', 'QY'
329y = getUnifRand('AA', 'ZZ', nsam)
330y
331'XE', 'RO', 'MK'
332call setCordance(cordance, tiedx, tiedy, x, y)
333[cordance, tiedx, tiedy]
334+3, +0, +0
335call setCordance(concordance, discordance, tiedx, tiedy, x, y)
336[concordance, discordance, tiedx, tiedy]
337+3, +0, +0, +0
338if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
339
340
341nsam = getUnifRand(0, 20)
342nsam
343+11
344x = getUnifRand('AA', 'ZZ', nsam)
345x
346'SJ', 'WX', 'JG', 'IW', 'KP', 'ZL', 'VY', 'ZS', 'VH', 'KA', 'VH'
347y = getUnifRand('AA', 'ZZ', nsam)
348y
349'XE', 'IE', 'PP', 'PW', 'HG', 'RG', 'SZ', 'QC', 'KT', 'IO', 'DR'
350call setCordance(cordance, tiedx, tiedy, x, y)
351[cordance, tiedx, tiedy]
352+14, +1, +0
353call setCordance(concordance, discordance, tiedx, tiedy, x, y)
354[concordance, discordance, tiedx, tiedy]
355+34, +20, +1, +0
356if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
357
358
359nsam = getUnifRand(0, 20)
360nsam
361+12
362x = getUnifRand('AA', 'ZZ', nsam)
363x
364'ZB', 'RC', 'UL', 'OW', 'EX', 'QC', 'NP', 'NP', 'QP', 'XM', 'OD', 'MW'
365y = getUnifRand('AA', 'ZZ', nsam)
366y
367'DC', 'RB', 'SI', 'ZL', 'RZ', 'MD', 'PC', 'YC', 'EQ', 'KB', 'BO', 'TY'
368call setCordance(cordance, tiedx, tiedy, x, y)
369[cordance, tiedx, tiedy]
370+9, +1, +0
371call setCordance(concordance, discordance, tiedx, tiedy, x, y)
372[concordance, discordance, tiedx, tiedy]
373+37, +28, +1, +0
374if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
375
376
377nsam = getUnifRand(0, 20)
378nsam
379+2
380x = getUnifRand('AA', 'ZZ', nsam)
381x
382'DT', 'KI'
383y = getUnifRand('AA', 'ZZ', nsam)
384y
385'UU', 'AH'
386call setCordance(cordance, tiedx, tiedy, x, y)
387[cordance, tiedx, tiedy]
388+1, +0, +0
389call setCordance(concordance, discordance, tiedx, tiedy, x, y)
390[concordance, discordance, tiedx, tiedy]
391+1, +0, +0, +0
392if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
393
394
395nsam = getUnifRand(0, 20)
396nsam
397+10
398x = getUnifRand('AA', 'ZZ', nsam)
399x
400'BF', 'UZ', 'PX', 'MX', 'ZD', 'DX', 'JE', 'BR', 'VR', 'CQ'
401y = getUnifRand('AA', 'ZZ', nsam)
402y
403'DV', 'NT', 'RT', 'LT', 'TC', 'PK', 'XC', 'YN', 'ZW', 'FK'
404call setCordance(cordance, tiedx, tiedy, x, y)
405[cordance, tiedx, tiedy]
406-21, +0, +0
407call setCordance(concordance, discordance, tiedx, tiedy, x, y)
408[concordance, discordance, tiedx, tiedy]
409+12, +33, +0, +0
410if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
411
412
413nsam = getUnifRand(0, 20)
414nsam
415+4
416x = getUnifRand('AA', 'ZZ', nsam)
417x
418'KB', 'MP', 'PF', 'UB'
419y = getUnifRand('AA', 'ZZ', nsam)
420y
421'NS', 'ZX', 'HC', 'EK'
422call setCordance(cordance, tiedx, tiedy, x, y)
423[cordance, tiedx, tiedy]
424+4, +0, +0
425call setCordance(concordance, discordance, tiedx, tiedy, x, y)
426[concordance, discordance, tiedx, tiedy]
427+5, +1, +0, +0
428if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
429
430
431nsam = getUnifRand(0, 20)
432nsam
433+9
434x = getUnifRand('AA', 'ZZ', nsam)
435x
436'YS', 'FH', 'JP', 'KU', 'VM', 'JE', 'YW', 'XU', 'SO'
437y = getUnifRand('AA', 'ZZ', nsam)
438y
439'WH', 'CU', 'QI', 'XY', 'LV', 'SW', 'ZW', 'PM', 'AS'
440call setCordance(cordance, tiedx, tiedy, x, y)
441[cordance, tiedx, tiedy]
442+4, +0, +0
443call setCordance(concordance, discordance, tiedx, tiedy, x, y)
444[concordance, discordance, tiedx, tiedy]
445+20, +16, +0, +0
446if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
447
448
449nsam = getUnifRand(0, 20)
450nsam
451+5
452x = getUnifRand('AA', 'ZZ', nsam)
453x
454'YJ', 'VZ', 'ET', 'GN', 'CU'
455y = getUnifRand('AA', 'ZZ', nsam)
456y
457'JK', 'IA', 'AR', 'ZL', 'ED'
458call setCordance(cordance, tiedx, tiedy, x, y)
459[cordance, tiedx, tiedy]
460+2, +0, +0
461call setCordance(concordance, discordance, tiedx, tiedy, x, y)
462[concordance, discordance, tiedx, tiedy]
463+6, +4, +0, +0
464if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
465
466
467nsam = getUnifRand(0, 20)
468nsam
469+3
470x = getUnifRand('AA', 'ZZ', nsam)
471x
472'VO', 'UT', 'JY'
473y = getUnifRand('AA', 'ZZ', nsam)
474y
475'CQ', 'FG', 'CR'
476call setCordance(cordance, tiedx, tiedy, x, y)
477[cordance, tiedx, tiedy]
478-1, +0, +0
479call setCordance(concordance, discordance, tiedx, tiedy, x, y)
480[concordance, discordance, tiedx, tiedy]
481+1, +2, +0, +0
482if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
483
484
485nsam = getUnifRand(0, 20)
486nsam
487+20
488x = getUnifRand('AA', 'ZZ', nsam)
489x
490'IP', 'ES', 'RT', 'FA', 'PR', 'EM', 'QP', 'ME', 'MP', 'YH', 'KE', 'AO', 'UM', 'EO', 'EZ', 'AY', 'HC', 'UQ', 'YD', 'PG'
491y = getUnifRand('AA', 'ZZ', nsam)
492y
493'NU', 'CF', 'KT', 'RN', 'NN', 'QX', 'NQ', 'IE', 'ME', 'UG', 'XJ', 'CH', 'WI', 'XW', 'UB', 'BK', 'ZD', 'BF', 'CS', 'NI'
494call setCordance(cordance, tiedx, tiedy, x, y)
495[cordance, tiedx, tiedy]
496-8, +0, +0
497call setCordance(concordance, discordance, tiedx, tiedy, x, y)
498[concordance, discordance, tiedx, tiedy]
499+91, +99, +0, +0
500if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
501
502
503nsam = getUnifRand(0, 20)
504nsam
505+20
506x = getUnifRand('AA', 'ZZ', nsam)
507x
508'ET', 'GI', 'FA', 'CB', 'KZ', 'DF', 'UL', 'SZ', 'LV', 'EP', 'YY', 'IF', 'JA', 'NQ', 'ZK', 'SP', 'AU', 'GK', 'KL', 'HB'
509y = getUnifRand('AA', 'ZZ', nsam)
510y
511'MF', 'OV', 'PG', 'AZ', 'LV', 'XC', 'LR', 'LJ', 'FN', 'GV', 'HG', 'TJ', 'BY', 'LR', 'PF', 'WH', 'UD', 'SP', 'OE', 'LH'
512call setCordance(cordance, tiedx, tiedy, x, y)
513[cordance, tiedx, tiedy]
514-13, +0, +1
515call setCordance(concordance, discordance, tiedx, tiedy, x, y)
516[concordance, discordance, tiedx, tiedy]
517+88, +101, +0, +1
518if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
519
520
521nsam = getUnifRand(0, 20)
522nsam
523+3
524x = getUnifRand('AA', 'ZZ', nsam)
525x
526'TC', 'BN', 'MO'
527y = getUnifRand('AA', 'ZZ', nsam)
528y
529'KH', 'YM', 'SC'
530call setCordance(cordance, tiedx, tiedy, x, y)
531[cordance, tiedx, tiedy]
532-1, +0, +0
533call setCordance(concordance, discordance, tiedx, tiedy, x, y)
534[concordance, discordance, tiedx, tiedy]
535+1, +2, +0, +0
536if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
537
538
539nsam = getUnifRand(0, 20)
540nsam
541+16
542x = getUnifRand('AA', 'ZZ', nsam)
543x
544'ZD', 'MT', 'MB', 'TA', 'EZ', 'QF', 'IF', 'EY', 'MU', 'TJ', 'WE', 'LO', 'AV', 'DQ', 'XL', 'QT'
545y = getUnifRand('AA', 'ZZ', nsam)
546y
547'MA', 'WL', 'YE', 'LO', 'HC', 'UA', 'VC', 'OA', 'HQ', 'YT', 'IS', 'MW', 'YT', 'ST', 'PA', 'SA'
548call setCordance(cordance, tiedx, tiedy, x, y)
549[cordance, tiedx, tiedy]
550-7, +0, +1
551call setCordance(concordance, discordance, tiedx, tiedy, x, y)
552[concordance, discordance, tiedx, tiedy]
553+56, +63, +0, +1
554if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
555
556
557nsam = getUnifRand(0, 20)
558nsam
559+9
560x = getUnifRand('AA', 'ZZ', nsam)
561x
562'RI', 'NK', 'ZJ', 'YO', 'VP', 'BZ', 'AJ', 'RG', 'BU'
563y = getUnifRand('AA', 'ZZ', nsam)
564y
565'ZZ', 'ZQ', 'EX', 'OH', 'VE', 'MF', 'PP', 'PV', 'TY'
566call setCordance(cordance, tiedx, tiedy, x, y)
567[cordance, tiedx, tiedy]
568+4, +0, +0
569call setCordance(concordance, discordance, tiedx, tiedy, x, y)
570[concordance, discordance, tiedx, tiedy]
571+20, +16, +0, +0
572if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
573
574
575nsam = getUnifRand(0, 20)
576nsam
577+6
578x = getUnifRand('AA', 'ZZ', nsam)
579x
580'OO', 'XH', 'OW', 'JA', 'MQ', 'CR'
581y = getUnifRand('AA', 'ZZ', nsam)
582y
583'HK', 'HP', 'DO', 'LX', 'KL', 'EK'
584call setCordance(cordance, tiedx, tiedy, x, y)
585[cordance, tiedx, tiedy]
586-1, +0, +0
587call setCordance(concordance, discordance, tiedx, tiedy, x, y)
588[concordance, discordance, tiedx, tiedy]
589+7, +8, +0, +0
590if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
591
592
593!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
594!Compute the cordance of two random integer vectors.
595!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
596
597
598nsam = getUnifRand(0, 20)
599nsam
600+2
601x = getUnifRand(1, nsam, nsam)
602x
603+1, +2
604y = getUnifRand(1, nsam, nsam)
605y
606+2, +2
607call setCordance(cordance, tiedx, tiedy, x, y)
608[cordance, tiedx, tiedy]
609+0, +0, +1
610call setCordance(concordance, discordance, tiedx, tiedy, x, y)
611[concordance, discordance, tiedx, tiedy]
612+0, +0, +0, +1
613if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
614
615
616nsam = getUnifRand(0, 20)
617nsam
618+20
619x = getUnifRand(1, nsam, nsam)
620x
621+3, +20, +14, +20, +1, +18, +12, +9, +14, +6, +5, +18, +18, +14, +7, +4, +3, +6, +15, +17
622y = getUnifRand(1, nsam, nsam)
623y
624+8, +10, +2, +19, +17, +18, +1, +12, +12, +8, +13, +9, +16, +20, +5, +12, +14, +10, +1, +10
625call setCordance(cordance, tiedx, tiedy, x, y)
626[cordance, tiedx, tiedy]
627+13, +9, +8
628call setCordance(concordance, discordance, tiedx, tiedy, x, y)
629[concordance, discordance, tiedx, tiedy]
630+93, +80, +9, +8
631if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
632
633
634nsam = getUnifRand(0, 20)
635nsam
636+1
637x = getUnifRand(1, nsam, nsam)
638x
639+1
640y = getUnifRand(1, nsam, nsam)
641y
642+1
643call setCordance(cordance, tiedx, tiedy, x, y)
644[cordance, tiedx, tiedy]
645+0, +0, +0
646call setCordance(concordance, discordance, tiedx, tiedy, x, y)
647[concordance, discordance, tiedx, tiedy]
648+0, +0, +0, +0
649if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
650
651
652nsam = getUnifRand(0, 20)
653nsam
654+14
655x = getUnifRand(1, nsam, nsam)
656x
657+13, +4, +11, +6, +6, +4, +9, +5, +12, +10, +13, +12, +5, +10
658y = getUnifRand(1, nsam, nsam)
659y
660+5, +1, +5, +2, +6, +13, +1, +3, +12, +11, +7, +8, +13, +14
661call setCordance(cordance, tiedx, tiedy, x, y)
662[cordance, tiedx, tiedy]
663-42, +6, +3
664call setCordance(concordance, discordance, tiedx, tiedy, x, y)
665[concordance, discordance, tiedx, tiedy]
666+20, +62, +6, +3
667if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
668
669
670nsam = getUnifRand(0, 20)
671nsam
672+11
673x = getUnifRand(1, nsam, nsam)
674x
675+5, +1, +10, +11, +5, +11, +10, +2, +10, +11, +5
676y = getUnifRand(1, nsam, nsam)
677y
678+10, +6, +10, +7, +11, +3, +2, +4, +10, +11, +8
679call setCordance(cordance, tiedx, tiedy, x, y)
680[cordance, tiedx, tiedy]
681-1, +9, +4
682call setCordance(concordance, discordance, tiedx, tiedy, x, y)
683[concordance, discordance, tiedx, tiedy]
684+21, +22, +9, +4
685if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
686
687
688nsam = getUnifRand(0, 20)
689nsam
690+16
691x = getUnifRand(1, nsam, nsam)
692x
693+6, +11, +8, +3, +12, +3, +8, +16, +16, +9, +12, +6, +6, +16, +9, +12
694y = getUnifRand(1, nsam, nsam)
695y
696+15, +12, +11, +12, +13, +6, +10, +15, +14, +5, +13, +13, +2, +13, +14, +15
697call setCordance(cordance, tiedx, tiedy, x, y)
698[cordance, tiedx, tiedy]
699-16, +12, +11
700call setCordance(concordance, discordance, tiedx, tiedy, x, y)
701[concordance, discordance, tiedx, tiedy]
702+41, +57, +12, +11
703if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
704
705
706nsam = getUnifRand(0, 20)
707nsam
708+11
709x = getUnifRand(1, nsam, nsam)
710x
711+7, +3, +6, +5, +4, +7, +4, +8, +11, +9, +11
712y = getUnifRand(1, nsam, nsam)
713y
714+4, +6, +6, +6, +6, +1, +9, +8, +10, +10, +6
715call setCordance(cordance, tiedx, tiedy, x, y)
716[cordance, tiedx, tiedy]
717-25, +3, +11
718call setCordance(concordance, discordance, tiedx, tiedy, x, y)
719[concordance, discordance, tiedx, tiedy]
720+8, +33, +3, +11
721if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
722
723
724nsam = getUnifRand(0, 20)
725nsam
726+12
727x = getUnifRand(1, nsam, nsam)
728x
729+11, +9, +4, +11, +12, +1, +12, +1, +3, +2, +2, +5
730y = getUnifRand(1, nsam, nsam)
731y
732+4, +11, +1, +12, +6, +7, +9, +7, +9, +10, +2, +3
733call setCordance(cordance, tiedx, tiedy, x, y)
734[cordance, tiedx, tiedy]
735+3, +4, +2
736call setCordance(concordance, discordance, tiedx, tiedy, x, y)
737[concordance, discordance, tiedx, tiedy]
738+32, +29, +4, +2
739if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
740
741
742nsam = getUnifRand(0, 20)
743nsam
744+16
745x = getUnifRand(1, nsam, nsam)
746x
747+3, +9, +3, +7, +7, +7, +15, +15, +7, +13, +4, +9, +12, +6, +15, +8
748y = getUnifRand(1, nsam, nsam)
749y
750+1, +10, +11, +11, +11, +1, +14, +13, +5, +6, +6, +8, +14, +13, +1, +16
751call setCordance(cordance, tiedx, tiedy, x, y)
752[cordance, tiedx, tiedy]
753-31, +11, +9
754call setCordance(concordance, discordance, tiedx, tiedy, x, y)
755[concordance, discordance, tiedx, tiedy]
756+35, +66, +11, +9
757if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
758
759
760nsam = getUnifRand(0, 20)
761nsam
762+10
763x = getUnifRand(1, nsam, nsam)
764x
765+8, +2, +7, +3, +3, +1, +4, +9, +9, +9
766y = getUnifRand(1, nsam, nsam)
767y
768+3, +9, +8, +5, +2, +3, +2, +7, +8, +1
769call setCordance(cordance, tiedx, tiedy, x, y)
770[cordance, tiedx, tiedy]
771+10, +4, +3
772call setCordance(concordance, discordance, tiedx, tiedy, x, y)
773[concordance, discordance, tiedx, tiedy]
774+24, +14, +4, +3
775if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
776
777
778nsam = getUnifRand(0, 20)
779nsam
780+5
781x = getUnifRand(1, nsam, nsam)
782x
783+2, +5, +3, +5, +4
784y = getUnifRand(1, nsam, nsam)
785y
786+1, +4, +1, +5, +3
787call setCordance(cordance, tiedx, tiedy, x, y)
788[cordance, tiedx, tiedy]
789-2, +1, +1
790call setCordance(concordance, discordance, tiedx, tiedy, x, y)
791[concordance, discordance, tiedx, tiedy]
792+3, +5, +1, +1
793if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
794
795
796nsam = getUnifRand(0, 20)
797nsam
798+15
799x = getUnifRand(1, nsam, nsam)
800x
801+10, +13, +10, +13, +7, +14, +8, +12, +15, +9, +1, +1, +2, +7, +8
802y = getUnifRand(1, nsam, nsam)
803y
804+12, +2, +3, +12, +2, +9, +8, +5, +5, +12, +8, +2, +3, +5, +10
805call setCordance(cordance, tiedx, tiedy, x, y)
806[cordance, tiedx, tiedy]
807+3, +5, +11
808call setCordance(concordance, discordance, tiedx, tiedy, x, y)
809[concordance, discordance, tiedx, tiedy]
810+46, +43, +5, +11
811if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
812
813
814nsam = getUnifRand(0, 20)
815nsam
816+6
817x = getUnifRand(1, nsam, nsam)
818x
819+3, +2, +2, +3, +2, +6
820y = getUnifRand(1, nsam, nsam)
821y
822+4, +1, +5, +4, +4, +4
823call setCordance(cordance, tiedx, tiedy, x, y)
824[cordance, tiedx, tiedy]
825+0, +4, +6
826call setCordance(concordance, discordance, tiedx, tiedy, x, y)
827[concordance, discordance, tiedx, tiedy]
828+3, +3, +4, +6
829if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
830
831
832nsam = getUnifRand(0, 20)
833nsam
834+1
835x = getUnifRand(1, nsam, nsam)
836x
837+1
838y = getUnifRand(1, nsam, nsam)
839y
840+1
841call setCordance(cordance, tiedx, tiedy, x, y)
842[cordance, tiedx, tiedy]
843+0, +0, +0
844call setCordance(concordance, discordance, tiedx, tiedy, x, y)
845[concordance, discordance, tiedx, tiedy]
846+0, +0, +0, +0
847if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
848
849
850nsam = getUnifRand(0, 20)
851nsam
852+20
853x = getUnifRand(1, nsam, nsam)
854x
855+4, +18, +20, +2, +6, +9, +6, +12, +14, +14, +2, +16, +6, +20, +19, +7, +18, +2, +7, +9
856y = getUnifRand(1, nsam, nsam)
857y
858+10, +7, +13, +8, +1, +20, +16, +9, +18, +18, +9, +9, +15, +18, +7, +6, +10, +9, +19, +8
859call setCordance(cordance, tiedx, tiedy, x, y)
860[cordance, tiedx, tiedy]
861+3, +11, +12
862call setCordance(concordance, discordance, tiedx, tiedy, x, y)
863[concordance, discordance, tiedx, tiedy]
864+86, +83, +11, +12
865if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
866
867
868!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
869!Compute the cordance of two random real vectors.
870!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
871
872
873nsam = getUnifRand(0, 20)
874nsam
875+9
876x = getUnifRand(1, nsam, nsam)
877x
878+4.00000000, +1.00000000, +8.00000000, +9.00000000, +6.00000000, +6.00000000, +1.00000000, +5.00000000, +2.00000000
879y = getUnifRand(1, nsam, nsam)
880y
881+8.00000000, +5.00000000, +8.00000000, +1.00000000, +5.00000000, +4.00000000, +5.00000000, +5.00000000, +8.00000000
882call setCordance(cordance, tiedx, tiedy, x, y)
883[cordance, tiedx, tiedy]
884+0, +2, +9
885call setCordance(concordance, discordance, tiedx, tiedy, x, y)
886[concordance, discordance, tiedx, tiedy]
887+13, +13, +2, +9
888if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
889
890
891nsam = getUnifRand(0, 20)
892nsam
893+7
894x = getUnifRand(1, nsam, nsam)
895x
896+6.00000000, +5.00000000, +5.00000000, +2.00000000, +1.00000000, +5.00000000, +1.00000000
897y = getUnifRand(1, nsam, nsam)
898y
899+7.00000000, +6.00000000, +5.00000000, +2.00000000, +1.00000000, +6.00000000, +6.00000000
900call setCordance(cordance, tiedx, tiedy, x, y)
901[cordance, tiedx, tiedy]
902+7, +4, +3
903call setCordance(concordance, discordance, tiedx, tiedy, x, y)
904[concordance, discordance, tiedx, tiedy]
905+11, +4, +4, +3
906if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
907
908
909nsam = getUnifRand(0, 20)
910nsam
911+19
912x = getUnifRand(1, nsam, nsam)
913x
914+8.00000000, +19.0000000, +13.0000000, +16.0000000, +4.00000000, +12.0000000, +14.0000000, +1.00000000, +9.00000000, +15.0000000, +13.0000000, +12.0000000, +1.00000000, +14.0000000, +17.0000000, +10.0000000, +9.00000000, +16.0000000, +5.00000000
915y = getUnifRand(1, nsam, nsam)
916y
917+6.00000000, +14.0000000, +17.0000000, +8.00000000, +11.0000000, +4.00000000, +6.00000000, +12.0000000, +10.0000000, +15.0000000, +16.0000000, +8.00000000, +5.00000000, +6.00000000, +17.0000000, +15.0000000, +9.00000000, +13.0000000, +3.00000000
918call setCordance(cordance, tiedx, tiedy, x, y)
919[cordance, tiedx, tiedy]
920+2, +6, +6
921call setCordance(concordance, discordance, tiedx, tiedy, x, y)
922[concordance, discordance, tiedx, tiedy]
923+81, +79, +6, +6
924if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
925
926
927nsam = getUnifRand(0, 20)
928nsam
929+18
930x = getUnifRand(1, nsam, nsam)
931x
932+5.00000000, +1.00000000, +18.0000000, +6.00000000, +18.0000000, +15.0000000, +16.0000000, +4.00000000, +6.00000000, +12.0000000, +2.00000000, +7.00000000, +8.00000000, +1.00000000, +4.00000000, +13.0000000, +15.0000000, +2.00000000
933y = getUnifRand(1, nsam, nsam)
934y
935+7.00000000, +13.0000000, +12.0000000, +2.00000000, +9.00000000, +15.0000000, +12.0000000, +17.0000000, +4.00000000, +8.00000000, +18.0000000, +7.00000000, +16.0000000, +3.00000000, +16.0000000, +5.00000000, +13.0000000, +2.00000000
936call setCordance(cordance, tiedx, tiedy, x, y)
937[cordance, tiedx, tiedy]
938+4, +6, +5
939call setCordance(concordance, discordance, tiedx, tiedy, x, y)
940[concordance, discordance, tiedx, tiedy]
941+73, +69, +6, +5
942if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
943
944
945nsam = getUnifRand(0, 20)
946nsam
947+7
948x = getUnifRand(1, nsam, nsam)
949x
950+5.00000000, +2.00000000, +3.00000000, +1.00000000, +3.00000000, +4.00000000, +7.00000000
951y = getUnifRand(1, nsam, nsam)
952y
953+6.00000000, +4.00000000, +5.00000000, +6.00000000, +4.00000000, +1.00000000, +2.00000000
954call setCordance(cordance, tiedx, tiedy, x, y)
955[cordance, tiedx, tiedy]
956+10, +1, +2
957call setCordance(concordance, discordance, tiedx, tiedy, x, y)
958[concordance, discordance, tiedx, tiedy]
959+14, +4, +1, +2
960if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
961
962
963nsam = getUnifRand(0, 20)
964nsam
965+5
966x = getUnifRand(1, nsam, nsam)
967x
968+3.00000000, +5.00000000, +2.00000000, +4.00000000, +5.00000000
969y = getUnifRand(1, nsam, nsam)
970y
971+1.00000000, +3.00000000, +3.00000000, +5.00000000, +5.00000000
972call setCordance(cordance, tiedx, tiedy, x, y)
973[cordance, tiedx, tiedy]
974-7, +1, +2
975call setCordance(concordance, discordance, tiedx, tiedy, x, y)
976[concordance, discordance, tiedx, tiedy]
977+0, +7, +1, +2
978if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
979
980
981nsam = getUnifRand(0, 20)
982nsam
983+1
984x = getUnifRand(1, nsam, nsam)
985x
986+1.00000000
987y = getUnifRand(1, nsam, nsam)
988y
989+1.00000000
990call setCordance(cordance, tiedx, tiedy, x, y)
991[cordance, tiedx, tiedy]
992+0, +0, +0
993call setCordance(concordance, discordance, tiedx, tiedy, x, y)
994[concordance, discordance, tiedx, tiedy]
995+0, +0, +0, +0
996if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
997
998
999nsam = getUnifRand(0, 20)
1000nsam
1001+6
1002x = getUnifRand(1, nsam, nsam)
1003x
1004+3.00000000, +6.00000000, +1.00000000, +2.00000000, +2.00000000, +5.00000000
1005y = getUnifRand(1, nsam, nsam)
1006y
1007+5.00000000, +4.00000000, +3.00000000, +2.00000000, +5.00000000, +1.00000000
1008call setCordance(cordance, tiedx, tiedy, x, y)
1009[cordance, tiedx, tiedy]
1010+9, +1, +1
1011call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1012[concordance, discordance, tiedx, tiedy]
1013+11, +2, +1, +1
1014if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1015
1016
1017nsam = getUnifRand(0, 20)
1018nsam
1019+20
1020x = getUnifRand(1, nsam, nsam)
1021x
1022+19.0000000, +11.0000000, +14.0000000, +10.0000000, +16.0000000, +10.0000000, +3.00000000, +4.00000000, +1.00000000, +14.0000000, +11.0000000, +20.0000000, +17.0000000, +1.00000000, +6.00000000, +13.0000000, +10.0000000, +18.0000000, +14.0000000, +13.0000000
1023y = getUnifRand(1, nsam, nsam)
1024y
1025+2.00000000, +19.0000000, +8.00000000, +17.0000000, +13.0000000, +14.0000000, +13.0000000, +9.00000000, +5.00000000, +10.0000000, +10.0000000, +10.0000000, +10.0000000, +8.00000000, +13.0000000, +9.00000000, +17.0000000, +4.00000000, +4.00000000, +16.0000000
1026call setCordance(cordance, tiedx, tiedy, x, y)
1027[cordance, tiedx, tiedy]
1028+23, +9, +13
1029call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1030[concordance, discordance, tiedx, tiedy]
1031+96, +73, +9, +13
1032if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1033
1034
1035nsam = getUnifRand(0, 20)
1036nsam
1037+18
1038x = getUnifRand(1, nsam, nsam)
1039x
1040+8.00000000, +17.0000000, +15.0000000, +6.00000000, +6.00000000, +5.00000000, +14.0000000, +14.0000000, +12.0000000, +7.00000000, +12.0000000, +17.0000000, +17.0000000, +1.00000000, +14.0000000, +16.0000000, +9.00000000, +5.00000000
1041y = getUnifRand(1, nsam, nsam)
1042y
1043+1.00000000, +5.00000000, +17.0000000, +8.00000000, +3.00000000, +13.0000000, +18.0000000, +6.00000000, +5.00000000, +9.00000000, +4.00000000, +10.0000000, +8.00000000, +9.00000000, +17.0000000, +16.0000000, +3.00000000, +5.00000000
1044call setCordance(cordance, tiedx, tiedy, x, y)
1045[cordance, tiedx, tiedy]
1046-17, +9, +7
1047call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1048[concordance, discordance, tiedx, tiedy]
1049+60, +77, +9, +7
1050if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1051
1052
1053nsam = getUnifRand(0, 20)
1054nsam
1055+5
1056x = getUnifRand(1, nsam, nsam)
1057x
1058+1.00000000, +5.00000000, +2.00000000, +2.00000000, +4.00000000
1059y = getUnifRand(1, nsam, nsam)
1060y
1061+1.00000000, +3.00000000, +2.00000000, +1.00000000, +3.00000000
1062call setCordance(cordance, tiedx, tiedy, x, y)
1063[cordance, tiedx, tiedy]
1064-3, +1, +2
1065call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1066[concordance, discordance, tiedx, tiedy]
1067+2, +5, +1, +2
1068if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1069
1070
1071nsam = getUnifRand(0, 20)
1072nsam
1073+14
1074x = getUnifRand(1, nsam, nsam)
1075x
1076+5.00000000, +10.0000000, +5.00000000, +6.00000000, +7.00000000, +3.00000000, +4.00000000, +12.0000000, +3.00000000, +3.00000000, +7.00000000, +14.0000000, +12.0000000, +7.00000000
1077y = getUnifRand(1, nsam, nsam)
1078y
1079+3.00000000, +10.0000000, +7.00000000, +9.00000000, +10.0000000, +1.00000000, +13.0000000, +5.00000000, +5.00000000, +1.00000000, +11.0000000, +6.00000000, +8.00000000, +14.0000000
1080call setCordance(cordance, tiedx, tiedy, x, y)
1081[cordance, tiedx, tiedy]
1082-9, +8, +3
1083call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1084[concordance, discordance, tiedx, tiedy]
1085+36, +45, +8, +3
1086if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1087
1088
1089nsam = getUnifRand(0, 20)
1090nsam
1091+5
1092x = getUnifRand(1, nsam, nsam)
1093x
1094+3.00000000, +4.00000000, +3.00000000, +3.00000000, +4.00000000
1095y = getUnifRand(1, nsam, nsam)
1096y
1097+5.00000000, +3.00000000, +1.00000000, +5.00000000, +2.00000000
1098call setCordance(cordance, tiedx, tiedy, x, y)
1099[cordance, tiedx, tiedy]
1100+2, +4, +1
1101call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1102[concordance, discordance, tiedx, tiedy]
1103+4, +2, +4, +1
1104if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1105
1106
1107nsam = getUnifRand(0, 20)
1108nsam
1109+14
1110x = getUnifRand(1, nsam, nsam)
1111x
1112+13.0000000, +11.0000000, +7.00000000, +6.00000000, +6.00000000, +13.0000000, +7.00000000, +1.00000000, +7.00000000, +4.00000000, +5.00000000, +1.00000000, +1.00000000, +3.00000000
1113y = getUnifRand(1, nsam, nsam)
1114y
1115+5.00000000, +2.00000000, +10.0000000, +7.00000000, +14.0000000, +12.0000000, +2.00000000, +7.00000000, +3.00000000, +4.00000000, +5.00000000, +14.0000000, +10.0000000, +5.00000000
1116call setCordance(cordance, tiedx, tiedy, x, y)
1117[cordance, tiedx, tiedy]
1118-6, +8, +7
1119call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1120[concordance, discordance, tiedx, tiedy]
1121+35, +41, +8, +7
1122if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1123
1124
1125nsam = getUnifRand(0, 20)
1126nsam
1127+20
1128x = getUnifRand(1, nsam, nsam)
1129x
1130+10.0000000, +4.00000000, +9.00000000, +9.00000000, +3.00000000, +10.0000000, +14.0000000, +3.00000000, +4.00000000, +15.0000000, +11.0000000, +8.00000000, +6.00000000, +13.0000000, +4.00000000, +20.0000000, +3.00000000, +6.00000000, +15.0000000, +10.0000000
1131y = getUnifRand(1, nsam, nsam)
1132y
1133+17.0000000, +4.00000000, +3.00000000, +9.00000000, +6.00000000, +13.0000000, +3.00000000, +14.0000000, +20.0000000, +15.0000000, +2.00000000, +11.0000000, +3.00000000, +13.0000000, +18.0000000, +12.0000000, +6.00000000, +12.0000000, +10.0000000, +20.0000000
1134call setCordance(cordance, tiedx, tiedy, x, y)
1135[cordance, tiedx, tiedy]
1136-24, +12, +7
1137call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1138[concordance, discordance, tiedx, tiedy]
1139+74, +98, +12, +7
1140if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1141
1142
Test:
test_pm_sampleCor
Todo:
Normal Priority: This generic interface should be extended to allow custom user-specified cordance criteria.


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, April 21, 2017, 1:54 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 17887 of file pm_sampleCor.F90.


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