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+12
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', '.', 'Learning', 'Carlo', 'a', 'Monte', 'Machine', 'and', 'ParaMonte', 'library'
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+14, +31, +0, +0
22if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
23
24
25nsam = getUnifRand(0, 20)
26nsam
27+9
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'.', 'Carlo', 'and', 'Monte', 'ParaMonte', 'is', 'a', 'Learning', 'Machine', 'library'
34call setCordance(cordance, tiedx, tiedy, x, y)
35[cordance, tiedx, tiedy]
36-17, +0, +0
37call setCordance(concordance, discordance, tiedx, tiedy, x, y)
38[concordance, discordance, tiedx, tiedy]
39+14, +31, +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+14
51x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
52x
53'OEWJLXFKSWEYIO'
54y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
55y
56'ODLNZRECHKFRPB'
57call setCordance(cordance, tiedx, tiedy, x, y)
58[cordance, tiedx, tiedy]
59+9, +3, +1
60call setCordance(concordance, discordance, tiedx, tiedy, x, y)
61[concordance, discordance, tiedx, tiedy]
62+48, +39, +3, +1
63if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
64
65
66nsam = getUnifRand(0, 20)
67nsam
68+14
69x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
70x
71'GCZSEOQAAKTQEM'
72y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
73y
74'KBFTHPPIMJVQDA'
75call setCordance(cordance, tiedx, tiedy, x, y)
76[cordance, tiedx, tiedy]
77-1, +3, +1
78call setCordance(concordance, discordance, tiedx, tiedy, x, y)
79[concordance, discordance, tiedx, tiedy]
80+43, +44, +3, +1
81if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
82
83
84nsam = getUnifRand(0, 20)
85nsam
86+8
87x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
88x
89'QTIKVYII'
90y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
91y
92'REHTDZTJ'
93call setCordance(cordance, tiedx, tiedy, x, y)
94[cordance, tiedx, tiedy]
95-4, +3, +1
96call setCordance(concordance, discordance, tiedx, tiedy, x, y)
97[concordance, discordance, tiedx, tiedy]
98+10, +14, +3, +1
99if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
100
101
102nsam = getUnifRand(0, 20)
103nsam
104+17
105x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
106x
107'MNWEIEIAVILCWIWRK'
108y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
109y
110'NGSXBGOLNAOLKCKGV'
111call setCordance(cordance, tiedx, tiedy, x, y)
112[cordance, tiedx, tiedy]
113+12, +10, +7
114call setCordance(concordance, discordance, tiedx, tiedy, x, y)
115[concordance, discordance, tiedx, tiedy]
116+66, +54, +10, +7
117if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
118
119
120nsam = getUnifRand(0, 20)
121nsam
122+9
123x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
124x
125'ELFAIYLAJ'
126y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
127y
128'PCNZKGRGT'
129call setCordance(cordance, tiedx, tiedy, x, y)
130[cordance, tiedx, tiedy]
131-3, +2, +1
132call setCordance(concordance, discordance, tiedx, tiedy, x, y)
133[concordance, discordance, tiedx, tiedy]
134+15, +18, +2, +1
135if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
136
137
138nsam = getUnifRand(0, 20)
139nsam
140+2
141x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
142x
143'BP'
144y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
145y
146'LG'
147call setCordance(cordance, tiedx, tiedy, x, y)
148[cordance, tiedx, tiedy]
149+1, +0, +0
150call setCordance(concordance, discordance, tiedx, tiedy, x, y)
151[concordance, discordance, tiedx, tiedy]
152+1, +0, +0, +0
153if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
154
155
156nsam = getUnifRand(0, 20)
157nsam
158+1
159x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
160x
161'F'
162y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
163y
164'Q'
165call setCordance(cordance, tiedx, tiedy, x, y)
166[cordance, tiedx, tiedy]
167+0, +0, +0
168call setCordance(concordance, discordance, tiedx, tiedy, x, y)
169[concordance, discordance, tiedx, tiedy]
170+0, +0, +0, +0
171if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
172
173
174nsam = getUnifRand(0, 20)
175nsam
176+9
177x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
178x
179'NZATEDLSV'
180y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
181y
182'FRFJNAPKB'
183call setCordance(cordance, tiedx, tiedy, x, y)
184[cordance, tiedx, tiedy]
185+3, +0, +1
186call setCordance(concordance, discordance, tiedx, tiedy, x, y)
187[concordance, discordance, tiedx, tiedy]
188+19, +16, +0, +1
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'FUNTZYSVJYYTBP'
198y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
199y
200'EJRPKNPJUIDXEM'
201call setCordance(cordance, tiedx, tiedy, x, y)
202[cordance, tiedx, tiedy]
203+0, +4, +3
204call setCordance(concordance, discordance, tiedx, tiedy, x, y)
205[concordance, discordance, tiedx, tiedy]
206+42, +42, +4, +3
207if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
208
209
210nsam = getUnifRand(0, 20)
211nsam
212+9
213x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
214x
215'XNVIFRJWJ'
216y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
217y
218'NORRYSVMP'
219call setCordance(cordance, tiedx, tiedy, x, y)
220[cordance, tiedx, tiedy]
221-8, +1, +1
222call setCordance(concordance, discordance, tiedx, tiedy, x, y)
223[concordance, discordance, tiedx, tiedy]
224+13, +21, +1, +1
225if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
226
227
228nsam = getUnifRand(0, 20)
229nsam
230+12
231x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
232x
233'TOTMKCQNQBMM'
234y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
235y
236'QVHLLGPEDYFP'
237call setCordance(cordance, tiedx, tiedy, x, y)
238[cordance, tiedx, tiedy]
239+13, +5, +2
240call setCordance(concordance, discordance, tiedx, tiedy, x, y)
241[concordance, discordance, tiedx, tiedy]
242+36, +23, +5, +2
243if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
244
245
246nsam = getUnifRand(0, 20)
247nsam
248+16
249x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
250x
251'DJQMLEXSLNKHCPDO'
252y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
253y
254'DSHTOQUWNURXJDLH'
255call setCordance(cordance, tiedx, tiedy, x, y)
256[cordance, tiedx, tiedy]
257+5, +2, +3
258call setCordance(concordance, discordance, tiedx, tiedy, x, y)
259[concordance, discordance, tiedx, tiedy]
260+60, +55, +2, +3
261if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
262
263
264nsam = getUnifRand(0, 20)
265nsam
266+2
267x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
268x
269'KY'
270y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
271y
272'DJ'
273call setCordance(cordance, tiedx, tiedy, x, y)
274[cordance, tiedx, tiedy]
275-1, +0, +0
276call setCordance(concordance, discordance, tiedx, tiedy, x, y)
277[concordance, discordance, tiedx, tiedy]
278+0, +1, +0, +0
279if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
280
281
282nsam = getUnifRand(0, 20)
283nsam
284+2
285x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
286x
287'LW'
288y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
289y
290'LK'
291call setCordance(cordance, tiedx, tiedy, x, y)
292[cordance, tiedx, tiedy]
293+1, +0, +0
294call setCordance(concordance, discordance, tiedx, tiedy, x, y)
295[concordance, discordance, tiedx, tiedy]
296+1, +0, +0, +0
297if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
298
299
300nsam = getUnifRand(0, 20)
301nsam
302+11
303x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
304x
305'VBAFOTEOPFT'
306y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
307y
308'XSVCUVHCKWG'
309call setCordance(cordance, tiedx, tiedy, x, y)
310[cordance, tiedx, tiedy]
311+12, +3, +2
312call setCordance(concordance, discordance, tiedx, tiedy, x, y)
313[concordance, discordance, tiedx, tiedy]
314+31, +19, +3, +2
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+16
326x = getUnifRand('AA', 'ZZ', nsam)
327x
328'JU', 'ND', 'LL', 'LM', 'KP', 'GG', 'LT', 'ME', 'NW', 'WV', 'BB', 'HT', 'ZH', 'ON', 'SZ', 'HB'
329y = getUnifRand('AA', 'ZZ', nsam)
330y
331'TR', 'HR', 'UI', 'OE', 'SQ', 'LU', 'CZ', 'GJ', 'CU', 'QT', 'OI', 'JN', 'ZT', 'AF', 'KH', 'WC'
332call setCordance(cordance, tiedx, tiedy, x, y)
333[cordance, tiedx, tiedy]
334+10, +0, +0
335call setCordance(concordance, discordance, tiedx, tiedy, x, y)
336[concordance, discordance, tiedx, tiedy]
337+65, +55, +0, +0
338if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
339
340
341nsam = getUnifRand(0, 20)
342nsam
343+2
344x = getUnifRand('AA', 'ZZ', nsam)
345x
346'AX', 'BI'
347y = getUnifRand('AA', 'ZZ', nsam)
348y
349'HF', 'CP'
350call setCordance(cordance, tiedx, tiedy, x, y)
351[cordance, tiedx, tiedy]
352+1, +0, +0
353call setCordance(concordance, discordance, tiedx, tiedy, x, y)
354[concordance, discordance, tiedx, tiedy]
355+1, +0, +0, +0
356if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
357
358
359nsam = getUnifRand(0, 20)
360nsam
361+20
362x = getUnifRand('AA', 'ZZ', nsam)
363x
364'IN', 'TS', 'XP', 'KR', 'TG', 'VC', 'FH', 'ZZ', 'TS', 'WB', 'WC', 'TP', 'HI', 'SW', 'LZ', 'FO', 'HH', 'OV', 'ET', 'XH'
365y = getUnifRand('AA', 'ZZ', nsam)
366y
367'IG', 'JY', 'BH', 'CS', 'WF', 'UV', 'YJ', 'VD', 'VD', 'EE', 'WY', 'VS', 'FX', 'MR', 'XN', 'EN', 'DI', 'VQ', 'BO', 'KE'
368call setCordance(cordance, tiedx, tiedy, x, y)
369[cordance, tiedx, tiedy]
370+2, +1, +1
371call setCordance(concordance, discordance, tiedx, tiedy, x, y)
372[concordance, discordance, tiedx, tiedy]
373+95, +93, +1, +1
374if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
375
376
377nsam = getUnifRand(0, 20)
378nsam
379+0
380x = getUnifRand('AA', 'ZZ', nsam)
381x
382
383y = getUnifRand('AA', 'ZZ', nsam)
384y
385
386call setCordance(cordance, tiedx, tiedy, x, y)
387[cordance, tiedx, tiedy]
388+0, +0, +0
389call setCordance(concordance, discordance, tiedx, tiedy, x, y)
390[concordance, discordance, tiedx, tiedy]
391+0, +0, +0, +0
392if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
393
394
395nsam = getUnifRand(0, 20)
396nsam
397+16
398x = getUnifRand('AA', 'ZZ', nsam)
399x
400'HW', 'OF', 'PD', 'VY', 'TX', 'YX', 'HB', 'AH', 'MH', 'QS', 'YJ', 'DK', 'CH', 'JI', 'CQ', 'QC'
401y = getUnifRand('AA', 'ZZ', nsam)
402y
403'YK', 'SS', 'GK', 'TN', 'JW', 'KJ', 'BQ', 'OA', 'DE', 'RY', 'GS', 'LK', 'MF', 'TY', 'WH', 'AG'
404call setCordance(cordance, tiedx, tiedy, x, y)
405[cordance, tiedx, tiedy]
406+6, +0, +0
407call setCordance(concordance, discordance, tiedx, tiedy, x, y)
408[concordance, discordance, tiedx, tiedy]
409+63, +57, +0, +0
410if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
411
412
413nsam = getUnifRand(0, 20)
414nsam
415+14
416x = getUnifRand('AA', 'ZZ', nsam)
417x
418'PB', 'EP', 'VU', 'FU', 'IG', 'UI', 'TQ', 'OT', 'FB', 'FG', 'EW', 'JQ', 'BR', 'QF'
419y = getUnifRand('AA', 'ZZ', nsam)
420y
421'NS', 'PT', 'YD', 'EP', 'SG', 'FV', 'ET', 'NN', 'VV', 'QL', 'CG', 'LP', 'DT', 'UK'
422call setCordance(cordance, tiedx, tiedy, x, y)
423[cordance, tiedx, tiedy]
424+11, +0, +0
425call setCordance(concordance, discordance, tiedx, tiedy, x, y)
426[concordance, discordance, tiedx, tiedy]
427+51, +40, +0, +0
428if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
429
430
431nsam = getUnifRand(0, 20)
432nsam
433+4
434x = getUnifRand('AA', 'ZZ', nsam)
435x
436'LU', 'RY', 'DJ', 'KB'
437y = getUnifRand('AA', 'ZZ', nsam)
438y
439'DV', 'YZ', 'IV', 'GG'
440call setCordance(cordance, tiedx, tiedy, x, y)
441[cordance, tiedx, tiedy]
442+0, +0, +0
443call setCordance(concordance, discordance, tiedx, tiedy, x, y)
444[concordance, discordance, tiedx, tiedy]
445+3, +3, +0, +0
446if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
447
448
449nsam = getUnifRand(0, 20)
450nsam
451+16
452x = getUnifRand('AA', 'ZZ', nsam)
453x
454'JC', 'BR', 'OC', 'LF', 'KN', 'VU', 'QL', 'MB', 'FJ', 'MB', 'XU', 'HE', 'OJ', 'HZ', 'KN', 'IU'
455y = getUnifRand('AA', 'ZZ', nsam)
456y
457'RK', 'AH', 'QI', 'IK', 'NK', 'LI', 'AZ', 'BS', 'GE', 'QB', 'KY', 'HT', 'FK', 'FF', 'KQ', 'NE'
458call setCordance(cordance, tiedx, tiedy, x, y)
459[cordance, tiedx, tiedy]
460+14, +2, +0
461call setCordance(concordance, discordance, tiedx, tiedy, x, y)
462[concordance, discordance, tiedx, tiedy]
463+66, +52, +2, +0
464if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
465
466
467nsam = getUnifRand(0, 20)
468nsam
469+4
470x = getUnifRand('AA', 'ZZ', nsam)
471x
472'WC', 'LS', 'SX', 'RQ'
473y = getUnifRand('AA', 'ZZ', nsam)
474y
475'OY', 'QC', 'UI', 'LO'
476call setCordance(cordance, tiedx, tiedy, x, y)
477[cordance, tiedx, tiedy]
478+0, +0, +0
479call setCordance(concordance, discordance, tiedx, tiedy, x, y)
480[concordance, discordance, tiedx, tiedy]
481+3, +3, +0, +0
482if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
483
484
485nsam = getUnifRand(0, 20)
486nsam
487+3
488x = getUnifRand('AA', 'ZZ', nsam)
489x
490'LO', 'XB', 'HR'
491y = getUnifRand('AA', 'ZZ', nsam)
492y
493'UL', 'GX', 'FR'
494call setCordance(cordance, tiedx, tiedy, x, y)
495[cordance, tiedx, tiedy]
496+3, +0, +0
497call setCordance(concordance, discordance, tiedx, tiedy, x, y)
498[concordance, discordance, tiedx, tiedy]
499+3, +0, +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'QI', 'QI', 'ZM', 'GA', 'GV', 'FP', 'TD', 'DP', 'EG', 'BL', 'OL', 'RX', 'CB', 'TV', 'RF', 'VP', 'VF', 'ZC', 'SX', 'JU'
509y = getUnifRand('AA', 'ZZ', nsam)
510y
511'HK', 'IO', 'IB', 'DF', 'UE', 'JJ', 'DG', 'JB', 'BE', 'ZK', 'EW', 'UX', 'TP', 'IR', 'MK', 'QF', 'YS', 'QI', 'WP', 'TH'
512call setCordance(cordance, tiedx, tiedy, x, y)
513[cordance, tiedx, tiedy]
514-71, +1, +0
515call setCordance(concordance, discordance, tiedx, tiedy, x, y)
516[concordance, discordance, tiedx, tiedy]
517+59, +130, +1, +0
518if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
519
520
521nsam = getUnifRand(0, 20)
522nsam
523+4
524x = getUnifRand('AA', 'ZZ', nsam)
525x
526'GM', 'OV', 'SV', 'BS'
527y = getUnifRand('AA', 'ZZ', nsam)
528y
529'UU', 'YX', 'XE', 'FE'
530call setCordance(cordance, tiedx, tiedy, x, y)
531[cordance, tiedx, tiedy]
532+2, +0, +0
533call setCordance(concordance, discordance, tiedx, tiedy, x, y)
534[concordance, discordance, tiedx, tiedy]
535+4, +2, +0, +0
536if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
537
538
539nsam = getUnifRand(0, 20)
540nsam
541+8
542x = getUnifRand('AA', 'ZZ', nsam)
543x
544'DW', 'IH', 'MO', 'OM', 'XJ', 'GG', 'QI', 'DS'
545y = getUnifRand('AA', 'ZZ', nsam)
546y
547'QJ', 'ZV', 'MA', 'YN', 'FI', 'IV', 'NB', 'PT'
548call setCordance(cordance, tiedx, tiedy, x, y)
549[cordance, tiedx, tiedy]
550+6, +0, +0
551call setCordance(concordance, discordance, tiedx, tiedy, x, y)
552[concordance, discordance, tiedx, tiedy]
553+17, +11, +0, +0
554if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
555
556
557nsam = getUnifRand(0, 20)
558nsam
559+20
560x = getUnifRand('AA', 'ZZ', nsam)
561x
562'QA', 'HN', 'CW', 'IO', 'QQ', 'TE', 'PP', 'MJ', 'SU', 'KL', 'WN', 'FJ', 'NV', 'ZF', 'OY', 'QL', 'PM', 'ZK', 'BC', 'DN'
563y = getUnifRand('AA', 'ZZ', nsam)
564y
565'JF', 'LC', 'QO', 'NO', 'CV', 'SX', 'DM', 'RV', 'VH', 'LN', 'LF', 'AR', 'FW', 'GT', 'NP', 'TY', 'MK', 'DW', 'FH', 'DY'
566call setCordance(cordance, tiedx, tiedy, x, y)
567[cordance, tiedx, tiedy]
568+22, +0, +0
569call setCordance(concordance, discordance, tiedx, tiedy, x, y)
570[concordance, discordance, tiedx, tiedy]
571+106, +84, +0, +0
572if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
573
574
575nsam = getUnifRand(0, 20)
576nsam
577+11
578x = getUnifRand('AA', 'ZZ', nsam)
579x
580'RX', 'BT', 'YB', 'BJ', 'YP', 'XE', 'LJ', 'TQ', 'UI', 'WG', 'II'
581y = getUnifRand('AA', 'ZZ', nsam)
582y
583'AL', 'AG', 'CD', 'VP', 'FJ', 'ET', 'UO', 'DC', 'WV', 'TW', 'ZR'
584call setCordance(cordance, tiedx, tiedy, x, y)
585[cordance, tiedx, tiedy]
586-31, +0, +0
587call setCordance(concordance, discordance, tiedx, tiedy, x, y)
588[concordance, discordance, tiedx, tiedy]
589+12, +43, +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+11
601x = getUnifRand(1, nsam, nsam)
602x
603+6, +1, +1, +1, +10, +9, +9, +10, +3, +4, +4
604y = getUnifRand(1, nsam, nsam)
605y
606+9, +6, +11, +2, +8, +3, +8, +6, +7, +3, +7
607call setCordance(cordance, tiedx, tiedy, x, y)
608[cordance, tiedx, tiedy]
609+11, +6, +4
610call setCordance(concordance, discordance, tiedx, tiedy, x, y)
611[concordance, discordance, tiedx, tiedy]
612+28, +17, +6, +4
613if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
614
615
616nsam = getUnifRand(0, 20)
617nsam
618+11
619x = getUnifRand(1, nsam, nsam)
620x
621+4, +9, +2, +5, +3, +7, +7, +11, +9, +4, +11
622y = getUnifRand(1, nsam, nsam)
623y
624+3, +6, +9, +9, +7, +8, +7, +8, +3, +4, +8
625call setCordance(cordance, tiedx, tiedy, x, y)
626[cordance, tiedx, tiedy]
627+0, +4, +6
628call setCordance(concordance, discordance, tiedx, tiedy, x, y)
629[concordance, discordance, tiedx, tiedy]
630+23, +23, +4, +6
631if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
632
633
634nsam = getUnifRand(0, 20)
635nsam
636+16
637x = getUnifRand(1, nsam, nsam)
638x
639+2, +8, +12, +8, +1, +12, +14, +3, +7, +13, +7, +14, +2, +1, +14, +16
640y = getUnifRand(1, nsam, nsam)
641y
642+14, +9, +12, +14, +5, +6, +11, +8, +14, +2, +12, +6, +10, +9, +10, +10
643call setCordance(cordance, tiedx, tiedy, x, y)
644[cordance, tiedx, tiedy]
645+13, +8, +9
646call setCordance(concordance, discordance, tiedx, tiedy, x, y)
647[concordance, discordance, tiedx, tiedy]
648+58, +45, +8, +9
649if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
650
651
652nsam = getUnifRand(0, 20)
653nsam
654+13
655x = getUnifRand(1, nsam, nsam)
656x
657+6, +10, +8, +13, +1, +3, +5, +12, +4, +6, +8, +5, +5
658y = getUnifRand(1, nsam, nsam)
659y
660+6, +11, +4, +8, +8, +13, +3, +7, +9, +3, +7, +13, +8
661call setCordance(cordance, tiedx, tiedy, x, y)
662[cordance, tiedx, tiedy]
663-5, +5, +6
664call setCordance(concordance, discordance, tiedx, tiedy, x, y)
665[concordance, discordance, tiedx, tiedy]
666+31, +36, +5, +6
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, +2, +11, +10, +1, +1, +5, +8, +8, +6, +3
676y = getUnifRand(1, nsam, nsam)
677y
678+6, +10, +11, +3, +5, +9, +3, +2, +7, +3, +5
679call setCordance(cordance, tiedx, tiedy, x, y)
680[cordance, tiedx, tiedy]
681+18, +3, +4
682call setCordance(concordance, discordance, tiedx, tiedy, x, y)
683[concordance, discordance, tiedx, tiedy]
684+33, +15, +3, +4
685if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
686
687
688nsam = getUnifRand(0, 20)
689nsam
690+20
691x = getUnifRand(1, nsam, nsam)
692x
693+13, +10, +17, +13, +15, +7, +3, +14, +20, +5, +19, +14, +2, +3, +4, +19, +16, +16, +8, +6
694y = getUnifRand(1, nsam, nsam)
695y
696+16, +3, +10, +20, +16, +9, +9, +6, +13, +17, +19, +6, +18, +16, +1, +10, +19, +10, +2, +6
697call setCordance(cordance, tiedx, tiedy, x, y)
698[cordance, tiedx, tiedy]
699+21, +5, +11
700call setCordance(concordance, discordance, tiedx, tiedy, x, y)
701[concordance, discordance, tiedx, tiedy]
702+98, +77, +5, +11
703if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
704
705
706nsam = getUnifRand(0, 20)
707nsam
708+8
709x = getUnifRand(1, nsam, nsam)
710x
711+5, +4, +7, +8, +6, +4, +7, +1
712y = getUnifRand(1, nsam, nsam)
713y
714+5, +1, +4, +8, +2, +4, +4, +3
715call setCordance(cordance, tiedx, tiedy, x, y)
716[cordance, tiedx, tiedy]
717+4, +2, +3
718call setCordance(concordance, discordance, tiedx, tiedy, x, y)
719[concordance, discordance, tiedx, tiedy]
720+14, +10, +2, +3
721if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
722
723
724nsam = getUnifRand(0, 20)
725nsam
726+20
727x = getUnifRand(1, nsam, nsam)
728x
729+17, +7, +15, +1, +15, +2, +20, +2, +10, +10, +3, +14, +19, +14, +7, +5, +12, +15, +6, +3
730y = getUnifRand(1, nsam, nsam)
731y
732+11, +7, +18, +13, +10, +12, +2, +10, +3, +5, +2, +3, +6, +17, +15, +7, +18, +9, +15, +5
733call setCordance(cordance, tiedx, tiedy, x, y)
734[cordance, tiedx, tiedy]
735+1, +8, +7
736call setCordance(concordance, discordance, tiedx, tiedy, x, y)
737[concordance, discordance, tiedx, tiedy]
738+88, +87, +8, +7
739if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
740
741
742nsam = getUnifRand(0, 20)
743nsam
744+1
745x = getUnifRand(1, nsam, nsam)
746x
747+1
748y = getUnifRand(1, nsam, nsam)
749y
750+1
751call setCordance(cordance, tiedx, tiedy, x, y)
752[cordance, tiedx, tiedy]
753+0, +0, +0
754call setCordance(concordance, discordance, tiedx, tiedy, x, y)
755[concordance, discordance, tiedx, tiedy]
756+0, +0, +0, +0
757if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
758
759
760nsam = getUnifRand(0, 20)
761nsam
762+5
763x = getUnifRand(1, nsam, nsam)
764x
765+5, +4, +1, +1, +3
766y = getUnifRand(1, nsam, nsam)
767y
768+5, +1, +2, +3, +3
769call setCordance(cordance, tiedx, tiedy, x, y)
770[cordance, tiedx, tiedy]
771+0, +1, +1
772call setCordance(concordance, discordance, tiedx, tiedy, x, y)
773[concordance, discordance, tiedx, tiedy]
774+4, +4, +1, +1
775if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
776
777
778nsam = getUnifRand(0, 20)
779nsam
780+9
781x = getUnifRand(1, nsam, nsam)
782x
783+6, +7, +6, +9, +6, +1, +5, +2, +3
784y = getUnifRand(1, nsam, nsam)
785y
786+1, +3, +1, +7, +9, +8, +7, +3, +2
787call setCordance(cordance, tiedx, tiedy, x, y)
788[cordance, tiedx, tiedy]
789-3, +3, +3
790call setCordance(concordance, discordance, tiedx, tiedy, x, y)
791[concordance, discordance, tiedx, tiedy]
792+14, +17, +3, +3
793if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
794
795
796nsam = getUnifRand(0, 20)
797nsam
798+2
799x = getUnifRand(1, nsam, nsam)
800x
801+1, +2
802y = getUnifRand(1, nsam, nsam)
803y
804+2, +2
805call setCordance(cordance, tiedx, tiedy, x, y)
806[cordance, tiedx, tiedy]
807+0, +0, +1
808call setCordance(concordance, discordance, tiedx, tiedy, x, y)
809[concordance, discordance, tiedx, tiedy]
810+0, +0, +0, +1
811if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
812
813
814nsam = getUnifRand(0, 20)
815nsam
816+5
817x = getUnifRand(1, nsam, nsam)
818x
819+4, +3, +4, +3, +2
820y = getUnifRand(1, nsam, nsam)
821y
822+4, +1, +5, +3, +1
823call setCordance(cordance, tiedx, tiedy, x, y)
824[cordance, tiedx, tiedy]
825+5, +2, +1
826call setCordance(concordance, discordance, tiedx, tiedy, x, y)
827[concordance, discordance, tiedx, tiedy]
828+6, +1, +2, +1
829if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
830
831
832nsam = getUnifRand(0, 20)
833nsam
834+18
835x = getUnifRand(1, nsam, nsam)
836x
837+11, +2, +7, +17, +16, +8, +6, +12, +7, +4, +9, +14, +10, +9, +5, +12, +8, +5
838y = getUnifRand(1, nsam, nsam)
839y
840+18, +6, +14, +16, +1, +4, +15, +6, +16, +12, +4, +4, +18, +15, +8, +7, +11, +16
841call setCordance(cordance, tiedx, tiedy, x, y)
842[cordance, tiedx, tiedy]
843+1, +5, +9
844call setCordance(concordance, discordance, tiedx, tiedy, x, y)
845[concordance, discordance, tiedx, tiedy]
846+70, +69, +5, +9
847if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
848
849
850nsam = getUnifRand(0, 20)
851nsam
852+11
853x = getUnifRand(1, nsam, nsam)
854x
855+11, +1, +4, +2, +9, +9, +9, +11, +5, +2, +6
856y = getUnifRand(1, nsam, nsam)
857y
858+7, +1, +9, +11, +3, +6, +9, +4, +9, +11, +8
859call setCordance(cordance, tiedx, tiedy, x, y)
860[cordance, tiedx, tiedy]
861-11, +5, +4
862call setCordance(concordance, discordance, tiedx, tiedy, x, y)
863[concordance, discordance, tiedx, tiedy]
864+18, +29, +5, +4
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+10
876x = getUnifRand(1, nsam, nsam)
877x
878+10.0000000, +2.00000000, +9.00000000, +7.00000000, +6.00000000, +9.00000000, +4.00000000, +8.00000000, +6.00000000, +1.00000000
879y = getUnifRand(1, nsam, nsam)
880y
881+3.00000000, +4.00000000, +1.00000000, +2.00000000, +3.00000000, +6.00000000, +1.00000000, +2.00000000, +6.00000000, +9.00000000
882call setCordance(cordance, tiedx, tiedy, x, y)
883[cordance, tiedx, tiedy]
884-11, +2, +4
885call setCordance(concordance, discordance, tiedx, tiedy, x, y)
886[concordance, discordance, tiedx, tiedy]
887+14, +25, +2, +4
888if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
889
890
891nsam = getUnifRand(0, 20)
892nsam
893+9
894x = getUnifRand(1, nsam, nsam)
895x
896+9.00000000, +6.00000000, +5.00000000, +3.00000000, +6.00000000, +4.00000000, +5.00000000, +2.00000000, +1.00000000
897y = getUnifRand(1, nsam, nsam)
898y
899+5.00000000, +5.00000000, +6.00000000, +3.00000000, +5.00000000, +7.00000000, +6.00000000, +2.00000000, +6.00000000
900call setCordance(cordance, tiedx, tiedy, x, y)
901[cordance, tiedx, tiedy]
902-4, +2, +6
903call setCordance(concordance, discordance, tiedx, tiedy, x, y)
904[concordance, discordance, tiedx, tiedy]
905+13, +17, +2, +6
906if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
907
908
909nsam = getUnifRand(0, 20)
910nsam
911+5
912x = getUnifRand(1, nsam, nsam)
913x
914+3.00000000, +4.00000000, +4.00000000, +2.00000000, +3.00000000
915y = getUnifRand(1, nsam, nsam)
916y
917+4.00000000, +1.00000000, +4.00000000, +2.00000000, +4.00000000
918call setCordance(cordance, tiedx, tiedy, x, y)
919[cordance, tiedx, tiedy]
920+0, +2, +3
921call setCordance(concordance, discordance, tiedx, tiedy, x, y)
922[concordance, discordance, tiedx, tiedy]
923+3, +3, +2, +3
924if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
925
926
927nsam = getUnifRand(0, 20)
928nsam
929+4
930x = getUnifRand(1, nsam, nsam)
931x
932+4.00000000, +2.00000000, +3.00000000, +2.00000000
933y = getUnifRand(1, nsam, nsam)
934y
935+3.00000000, +3.00000000, +4.00000000, +2.00000000
936call setCordance(cordance, tiedx, tiedy, x, y)
937[cordance, tiedx, tiedy]
938+0, +1, +1
939call setCordance(concordance, discordance, tiedx, tiedy, x, y)
940[concordance, discordance, tiedx, tiedy]
941+2, +2, +1, +1
942if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
943
944
945nsam = getUnifRand(0, 20)
946nsam
947+12
948x = getUnifRand(1, nsam, nsam)
949x
950+11.0000000, +12.0000000, +1.00000000, +10.0000000, +6.00000000, +10.0000000, +1.00000000, +10.0000000, +9.00000000, +4.00000000, +8.00000000, +4.00000000
951y = getUnifRand(1, nsam, nsam)
952y
953+4.00000000, +8.00000000, +8.00000000, +1.00000000, +12.0000000, +1.00000000, +10.0000000, +5.00000000, +8.00000000, +10.0000000, +5.00000000, +11.0000000
954call setCordance(cordance, tiedx, tiedy, x, y)
955[cordance, tiedx, tiedy]
956-12, +5, +6
957call setCordance(concordance, discordance, tiedx, tiedy, x, y)
958[concordance, discordance, tiedx, tiedy]
959+22, +34, +5, +6
960if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
961
962
963nsam = getUnifRand(0, 20)
964nsam
965+7
966x = getUnifRand(1, nsam, nsam)
967x
968+1.00000000, +3.00000000, +5.00000000, +5.00000000, +7.00000000, +2.00000000, +2.00000000
969y = getUnifRand(1, nsam, nsam)
970y
971+3.00000000, +6.00000000, +5.00000000, +4.00000000, +6.00000000, +7.00000000, +3.00000000
972call setCordance(cordance, tiedx, tiedy, x, y)
973[cordance, tiedx, tiedy]
974-5, +2, +2
975call setCordance(concordance, discordance, tiedx, tiedy, x, y)
976[concordance, discordance, tiedx, tiedy]
977+6, +11, +2, +2
978if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
979
980
981nsam = getUnifRand(0, 20)
982nsam
983+19
984x = getUnifRand(1, nsam, nsam)
985x
986+13.0000000, +2.00000000, +12.0000000, +2.00000000, +2.00000000, +2.00000000, +6.00000000, +12.0000000, +7.00000000, +1.00000000, +9.00000000, +10.0000000, +2.00000000, +7.00000000, +4.00000000, +12.0000000, +18.0000000, +12.0000000, +14.0000000
987y = getUnifRand(1, nsam, nsam)
988y
989+10.0000000, +2.00000000, +10.0000000, +4.00000000, +4.00000000, +19.0000000, +3.00000000, +7.00000000, +4.00000000, +16.0000000, +3.00000000, +6.00000000, +12.0000000, +8.00000000, +11.0000000, +18.0000000, +15.0000000, +4.00000000, +5.00000000
990call setCordance(cordance, tiedx, tiedy, x, y)
991[cordance, tiedx, tiedy]
992-23, +17, +8
993call setCordance(concordance, discordance, tiedx, tiedy, x, y)
994[concordance, discordance, tiedx, tiedy]
995+62, +85, +17, +8
996if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
997
998
999nsam = getUnifRand(0, 20)
1000nsam
1001+7
1002x = getUnifRand(1, nsam, nsam)
1003x
1004+2.00000000, +4.00000000, +3.00000000, +2.00000000, +2.00000000, +5.00000000, +5.00000000
1005y = getUnifRand(1, nsam, nsam)
1006y
1007+2.00000000, +3.00000000, +1.00000000, +5.00000000, +5.00000000, +3.00000000, +5.00000000
1008call setCordance(cordance, tiedx, tiedy, x, y)
1009[cordance, tiedx, tiedy]
1010-6, +4, +4
1011call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1012[concordance, discordance, tiedx, tiedy]
1013+4, +10, +4, +4
1014if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1015
1016
1017nsam = getUnifRand(0, 20)
1018nsam
1019+1
1020x = getUnifRand(1, nsam, nsam)
1021x
1022+1.00000000
1023y = getUnifRand(1, nsam, nsam)
1024y
1025+1.00000000
1026call setCordance(cordance, tiedx, tiedy, x, y)
1027[cordance, tiedx, tiedy]
1028+0, +0, +0
1029call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1030[concordance, discordance, tiedx, tiedy]
1031+0, +0, +0, +0
1032if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1033
1034
1035nsam = getUnifRand(0, 20)
1036nsam
1037+7
1038x = getUnifRand(1, nsam, nsam)
1039x
1040+1.00000000, +2.00000000, +5.00000000, +2.00000000, +4.00000000, +2.00000000, +4.00000000
1041y = getUnifRand(1, nsam, nsam)
1042y
1043+6.00000000, +6.00000000, +1.00000000, +5.00000000, +5.00000000, +1.00000000, +7.00000000
1044call setCordance(cordance, tiedx, tiedy, x, y)
1045[cordance, tiedx, tiedy]
1046+0, +4, +3
1047call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1048[concordance, discordance, tiedx, tiedy]
1049+7, +7, +4, +3
1050if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1051
1052
1053nsam = getUnifRand(0, 20)
1054nsam
1055+0
1056x = getUnifRand(1, nsam, nsam)
1057x
1058
1059y = getUnifRand(1, nsam, nsam)
1060y
1061
1062call setCordance(cordance, tiedx, tiedy, x, y)
1063[cordance, tiedx, tiedy]
1064+0, +0, +0
1065call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1066[concordance, discordance, tiedx, tiedy]
1067+0, +0, +0, +0
1068if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1069
1070
1071nsam = getUnifRand(0, 20)
1072nsam
1073+18
1074x = getUnifRand(1, nsam, nsam)
1075x
1076+8.00000000, +15.0000000, +9.00000000, +15.0000000, +17.0000000, +8.00000000, +16.0000000, +16.0000000, +3.00000000, +15.0000000, +2.00000000, +8.00000000, +15.0000000, +15.0000000, +17.0000000, +7.00000000, +16.0000000, +6.00000000
1077y = getUnifRand(1, nsam, nsam)
1078y
1079+18.0000000, +18.0000000, +16.0000000, +11.0000000, +9.00000000, +9.00000000, +16.0000000, +17.0000000, +16.0000000, +11.0000000, +13.0000000, +10.0000000, +5.00000000, +16.0000000, +18.0000000, +8.00000000, +2.00000000, +1.00000000
1080call setCordance(cordance, tiedx, tiedy, x, y)
1081[cordance, tiedx, tiedy]
1082+60, +17, +11
1083call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1084[concordance, discordance, tiedx, tiedy]
1085+93, +33, +17, +11
1086if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1087
1088
1089nsam = getUnifRand(0, 20)
1090nsam
1091+4
1092x = getUnifRand(1, nsam, nsam)
1093x
1094+4.00000000, +1.00000000, +4.00000000, +3.00000000
1095y = getUnifRand(1, nsam, nsam)
1096y
1097+1.00000000, +4.00000000, +4.00000000, +2.00000000
1098call setCordance(cordance, tiedx, tiedy, x, y)
1099[cordance, tiedx, tiedy]
1100+0, +1, +1
1101call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1102[concordance, discordance, tiedx, tiedy]
1103+2, +2, +1, +1
1104if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1105
1106
1107nsam = getUnifRand(0, 20)
1108nsam
1109+0
1110x = getUnifRand(1, nsam, nsam)
1111x
1112
1113y = getUnifRand(1, nsam, nsam)
1114y
1115
1116call setCordance(cordance, tiedx, tiedy, x, y)
1117[cordance, tiedx, tiedy]
1118+0, +0, +0
1119call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1120[concordance, discordance, tiedx, tiedy]
1121+0, +0, +0, +0
1122if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1123
1124
1125nsam = getUnifRand(0, 20)
1126nsam
1127+9
1128x = getUnifRand(1, nsam, nsam)
1129x
1130+9.00000000, +2.00000000, +4.00000000, +7.00000000, +7.00000000, +4.00000000, +9.00000000, +8.00000000, +7.00000000
1131y = getUnifRand(1, nsam, nsam)
1132y
1133+9.00000000, +1.00000000, +6.00000000, +7.00000000, +7.00000000, +1.00000000, +4.00000000, +8.00000000, +9.00000000
1134call setCordance(cordance, tiedx, tiedy, x, y)
1135[cordance, tiedx, tiedy]
1136-7, +5, +3
1137call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1138[concordance, discordance, tiedx, tiedy]
1139+11, +18, +5, +3
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 at Austin

Definition at line 17887 of file pm_sampleCor.F90.


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