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+11
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'Monte', 'Learning', 'a', 'Machine', 'and', 'library', 'Carlo', 'is', 'ParaMonte', '.'
16call setCordance(cordance, tiedx, tiedy, x, y)
17[cordance, tiedx, tiedy]
18+1, +0, +0
19call setCordance(concordance, discordance, tiedx, tiedy, x, y)
20[concordance, discordance, tiedx, tiedy]
21+23, +22, +0, +0
22if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
23
24
25nsam = getUnifRand(0, 20)
26nsam
27+13
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'.', 'ParaMonte', 'Carlo', 'and', 'is', 'library', 'Learning', 'Machine', 'Monte', 'a'
34call setCordance(cordance, tiedx, tiedy, x, y)
35[cordance, tiedx, tiedy]
36-13, +0, +0
37call setCordance(concordance, discordance, tiedx, tiedy, x, y)
38[concordance, discordance, tiedx, tiedy]
39+16, +29, +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+13
51x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
52x
53'AWZLKYBTEMPRL'
54y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
55y
56'NJYNJZRPMHJOV'
57call setCordance(cordance, tiedx, tiedy, x, y)
58[cordance, tiedx, tiedy]
59+3, +1, +4
60call setCordance(concordance, discordance, tiedx, tiedy, x, y)
61[concordance, discordance, tiedx, tiedy]
62+38, +35, +1, +4
63if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
64
65
66nsam = getUnifRand(0, 20)
67nsam
68+8
69x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
70x
71'DETMAMRO'
72y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
73y
74'UUXBYEXE'
75call setCordance(cordance, tiedx, tiedy, x, y)
76[cordance, tiedx, tiedy]
77+2, +1, +3
78call setCordance(concordance, discordance, tiedx, tiedy, x, y)
79[concordance, discordance, tiedx, tiedy]
80+13, +11, +1, +3
81if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
82
83
84nsam = getUnifRand(0, 20)
85nsam
86+17
87x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
88x
89'UYDRMWKOYWHPGSMJS'
90y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
91y
92'GMNQFGQWCXDTBVKER'
93call setCordance(cordance, tiedx, tiedy, x, y)
94[cordance, tiedx, tiedy]
95-6, +4, +2
96call setCordance(concordance, discordance, tiedx, tiedy, x, y)
97[concordance, discordance, tiedx, tiedy]
98+62, +68, +4, +2
99if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
100
101
102nsam = getUnifRand(0, 20)
103nsam
104+18
105x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
106x
107'XYVBLLQPLFAGUHBPBK'
108y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
109y
110'ORPEKJIPXZVPIGENWC'
111call setCordance(cordance, tiedx, tiedy, x, y)
112[cordance, tiedx, tiedy]
113+24, +7, +5
114call setCordance(concordance, discordance, tiedx, tiedy, x, y)
115[concordance, discordance, tiedx, tiedy]
116+83, +59, +7, +5
117if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
118
119
120nsam = getUnifRand(0, 20)
121nsam
122+0
123x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
124x
125''
126y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
127y
128''
129call setCordance(cordance, tiedx, tiedy, x, y)
130[cordance, tiedx, tiedy]
131+0, +0, +0
132call setCordance(concordance, discordance, tiedx, tiedy, x, y)
133[concordance, discordance, tiedx, tiedy]
134+0, +0, +0, +0
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'CGKGVCHZ'
144y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
145y
146'ABPMBCBY'
147call setCordance(cordance, tiedx, tiedy, x, y)
148[cordance, tiedx, tiedy]
149-7, +2, +3
150call setCordance(concordance, discordance, tiedx, tiedy, x, y)
151[concordance, discordance, tiedx, tiedy]
152+8, +15, +2, +3
153if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
154
155
156nsam = getUnifRand(0, 20)
157nsam
158+17
159x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
160x
161'TFGBTIDAEPFZUQGWI'
162y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
163y
164'XJLPARFRWCEXAEBCO'
165call setCordance(cordance, tiedx, tiedy, x, y)
166[cordance, tiedx, tiedy]
167+25, +4, +5
168call setCordance(concordance, discordance, tiedx, tiedy, x, y)
169[concordance, discordance, tiedx, tiedy]
170+76, +51, +4, +5
171if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
172
173
174nsam = getUnifRand(0, 20)
175nsam
176+4
177x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
178x
179'PBRM'
180y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
181y
182'RYMZ'
183call setCordance(cordance, tiedx, tiedy, x, y)
184[cordance, tiedx, tiedy]
185-2, +0, +0
186call setCordance(concordance, discordance, tiedx, tiedy, x, y)
187[concordance, discordance, tiedx, tiedy]
188+2, +4, +0, +0
189if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
190
191
192nsam = getUnifRand(0, 20)
193nsam
194+8
195x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
196x
197'LZSWSQCZ'
198y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
199y
200'HUIQRFLP'
201call setCordance(cordance, tiedx, tiedy, x, y)
202[cordance, tiedx, tiedy]
203+0, +2, +0
204call setCordance(concordance, discordance, tiedx, tiedy, x, y)
205[concordance, discordance, tiedx, tiedy]
206+13, +13, +2, +0
207if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
208
209
210nsam = getUnifRand(0, 20)
211nsam
212+18
213x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
214x
215'LQGIQHCJWMQRSUFPRK'
216y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
217y
218'RMPYSIHCUIDMKBEIHA'
219call setCordance(cordance, tiedx, tiedy, x, y)
220[cordance, tiedx, tiedy]
221+68, +4, +5
222call setCordance(concordance, discordance, tiedx, tiedy, x, y)
223[concordance, discordance, tiedx, tiedy]
224+106, +38, +4, +5
225if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
226
227
228nsam = getUnifRand(0, 20)
229nsam
230+4
231x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
232x
233'UODM'
234y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
235y
236'VJDD'
237call setCordance(cordance, tiedx, tiedy, x, y)
238[cordance, tiedx, tiedy]
239+5, +0, +1
240call setCordance(concordance, discordance, tiedx, tiedy, x, y)
241[concordance, discordance, tiedx, tiedy]
242+5, +0, +0, +1
243if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
244
245
246nsam = getUnifRand(0, 20)
247nsam
248+17
249x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
250x
251'JLJWTSSUANFWSWMKR'
252y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
253y
254'KEELTZMYCVSNUTJHM'
255call setCordance(cordance, tiedx, tiedy, x, y)
256[cordance, tiedx, tiedy]
257-8, +7, +3
258call setCordance(concordance, discordance, tiedx, tiedy, x, y)
259[concordance, discordance, tiedx, tiedy]
260+59, +67, +7, +3
261if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
262
263
264nsam = getUnifRand(0, 20)
265nsam
266+1
267x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
268x
269'X'
270y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
271y
272'O'
273call setCordance(cordance, tiedx, tiedy, x, y)
274[cordance, tiedx, tiedy]
275+0, +0, +0
276call setCordance(concordance, discordance, tiedx, tiedy, x, y)
277[concordance, discordance, tiedx, tiedy]
278+0, +0, +0, +0
279if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
280
281
282nsam = getUnifRand(0, 20)
283nsam
284+7
285x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
286x
287'VDORUUJ'
288y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
289y
290'EXQQDBY'
291call setCordance(cordance, tiedx, tiedy, x, y)
292[cordance, tiedx, tiedy]
293+1, +1, +1
294call setCordance(concordance, discordance, tiedx, tiedy, x, y)
295[concordance, discordance, tiedx, tiedy]
296+10, +9, +1, +1
297if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
298
299
300nsam = getUnifRand(0, 20)
301nsam
302+16
303x = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
304x
305'YGZOAOJHFNBRCMBB'
306y = getUnifRand(repeat('A', nsam), repeat('Z', nsam))
307y
308'RLLFWZWEAHXJOEPF'
309call setCordance(cordance, tiedx, tiedy, x, y)
310[cordance, tiedx, tiedy]
311+16, +4, +4
312call setCordance(concordance, discordance, tiedx, tiedy, x, y)
313[concordance, discordance, tiedx, tiedy]
314+64, +48, +4, +4
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+18
326x = getUnifRand('AA', 'ZZ', nsam)
327x
328'IC', 'WR', 'TE', 'QB', 'WA', 'EH', 'LY', 'BC', 'EJ', 'HP', 'AJ', 'QT', 'RW', 'TE', 'XN', 'FD', 'KD', 'PB'
329y = getUnifRand('AA', 'ZZ', nsam)
330y
331'DF', 'JN', 'FE', 'SZ', 'CX', 'OC', 'QV', 'EA', 'YP', 'UB', 'GW', 'YB', 'LT', 'RN', 'GK', 'NH', 'ZG', 'TH'
332call setCordance(cordance, tiedx, tiedy, x, y)
333[cordance, tiedx, tiedy]
334-50, +1, +0
335call setCordance(concordance, discordance, tiedx, tiedy, x, y)
336[concordance, discordance, tiedx, tiedy]
337+51, +101, +1, +0
338if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
339
340
341nsam = getUnifRand(0, 20)
342nsam
343+0
344x = getUnifRand('AA', 'ZZ', nsam)
345x
346
347y = getUnifRand('AA', 'ZZ', nsam)
348y
349
350call setCordance(cordance, tiedx, tiedy, x, y)
351[cordance, tiedx, tiedy]
352+0, +0, +0
353call setCordance(concordance, discordance, tiedx, tiedy, x, y)
354[concordance, discordance, tiedx, tiedy]
355+0, +0, +0, +0
356if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
357
358
359nsam = getUnifRand(0, 20)
360nsam
361+4
362x = getUnifRand('AA', 'ZZ', nsam)
363x
364'LU', 'TT', 'FI', 'JM'
365y = getUnifRand('AA', 'ZZ', nsam)
366y
367'FH', 'EK', 'GG', 'HP'
368call setCordance(cordance, tiedx, tiedy, x, y)
369[cordance, tiedx, tiedy]
370-4, +0, +0
371call setCordance(concordance, discordance, tiedx, tiedy, x, y)
372[concordance, discordance, tiedx, tiedy]
373+1, +5, +0, +0
374if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
375
376
377nsam = getUnifRand(0, 20)
378nsam
379+6
380x = getUnifRand('AA', 'ZZ', nsam)
381x
382'QO', 'QV', 'BD', 'VP', 'HR', 'WU'
383y = getUnifRand('AA', 'ZZ', nsam)
384y
385'YY', 'YG', 'LP', 'GX', 'BN', 'EY'
386call setCordance(cordance, tiedx, tiedy, x, y)
387[cordance, tiedx, tiedy]
388+13, +0, +0
389call setCordance(concordance, discordance, tiedx, tiedy, x, y)
390[concordance, discordance, tiedx, tiedy]
391+14, +1, +0, +0
392if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
393
394
395nsam = getUnifRand(0, 20)
396nsam
397+9
398x = getUnifRand('AA', 'ZZ', nsam)
399x
400'XG', 'KL', 'YW', 'RH', 'RJ', 'AW', 'RY', 'ZI', 'IC'
401y = getUnifRand('AA', 'ZZ', nsam)
402y
403'QJ', 'VM', 'FS', 'JO', 'VA', 'KN', 'YQ', 'RA', 'AI'
404call setCordance(cordance, tiedx, tiedy, x, y)
405[cordance, tiedx, tiedy]
406+2, +0, +0
407call setCordance(concordance, discordance, tiedx, tiedy, x, y)
408[concordance, discordance, tiedx, tiedy]
409+19, +17, +0, +0
410if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
411
412
413nsam = getUnifRand(0, 20)
414nsam
415+8
416x = getUnifRand('AA', 'ZZ', nsam)
417x
418'GJ', 'UL', 'DP', 'JL', 'QK', 'HD', 'CY', 'MS'
419y = getUnifRand('AA', 'ZZ', nsam)
420y
421'WS', 'WX', 'JF', 'KY', 'QT', 'CA', 'CX', 'AU'
422call setCordance(cordance, tiedx, tiedy, x, y)
423[cordance, tiedx, tiedy]
424+18, +0, +0
425call setCordance(concordance, discordance, tiedx, tiedy, x, y)
426[concordance, discordance, tiedx, tiedy]
427+23, +5, +0, +0
428if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
429
430
431nsam = getUnifRand(0, 20)
432nsam
433+15
434x = getUnifRand('AA', 'ZZ', nsam)
435x
436'QP', 'EW', 'TO', 'EW', 'WF', 'NK', 'AH', 'IF', 'OS', 'LY', 'ZM', 'QZ', 'ZL', 'AQ', 'XZ'
437y = getUnifRand('AA', 'ZZ', nsam)
438y
439'DB', 'WW', 'RW', 'RY', 'WD', 'CS', 'KZ', 'IJ', 'QK', 'PM', 'HX', 'TQ', 'AA', 'BY', 'LH'
440call setCordance(cordance, tiedx, tiedy, x, y)
441[cordance, tiedx, tiedy]
442+28, +1, +0
443call setCordance(concordance, discordance, tiedx, tiedy, x, y)
444[concordance, discordance, tiedx, tiedy]
445+66, +38, +1, +0
446if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
447
448
449nsam = getUnifRand(0, 20)
450nsam
451+15
452x = getUnifRand('AA', 'ZZ', nsam)
453x
454'MO', 'KU', 'RF', 'SE', 'KA', 'TT', 'FK', 'DH', 'GU', 'HA', 'AL', 'AK', 'NK', 'FE', 'UY'
455y = getUnifRand('AA', 'ZZ', nsam)
456y
457'EV', 'EA', 'VE', 'FZ', 'AK', 'BD', 'KU', 'AY', 'CA', 'SY', 'HP', 'RW', 'IG', 'FX', 'JD'
458call setCordance(cordance, tiedx, tiedy, x, y)
459[cordance, tiedx, tiedy]
460-19, +0, +0
461call setCordance(concordance, discordance, tiedx, tiedy, x, y)
462[concordance, discordance, tiedx, tiedy]
463+43, +62, +0, +0
464if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
465
466
467nsam = getUnifRand(0, 20)
468nsam
469+9
470x = getUnifRand('AA', 'ZZ', nsam)
471x
472'UP', 'DT', 'JY', 'MU', 'YT', 'ZH', 'BD', 'WO', 'ZU'
473y = getUnifRand('AA', 'ZZ', nsam)
474y
475'XF', 'KA', 'FG', 'KW', 'AW', 'OO', 'JH', 'ZM', 'RJ'
476call setCordance(cordance, tiedx, tiedy, x, y)
477[cordance, tiedx, tiedy]
478-6, +0, +0
479call setCordance(concordance, discordance, tiedx, tiedy, x, y)
480[concordance, discordance, tiedx, tiedy]
481+15, +21, +0, +0
482if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
483
484
485nsam = getUnifRand(0, 20)
486nsam
487+14
488x = getUnifRand('AA', 'ZZ', nsam)
489x
490'BP', 'QY', 'AG', 'AO', 'DP', 'CX', 'RT', 'OA', 'RI', 'ZG', 'BK', 'PW', 'FJ', 'IH'
491y = getUnifRand('AA', 'ZZ', nsam)
492y
493'CO', 'EJ', 'QA', 'KN', 'SQ', 'KN', 'AH', 'KK', 'KB', 'XY', 'YO', 'ED', 'PE', 'ID'
494call setCordance(cordance, tiedx, tiedy, x, y)
495[cordance, tiedx, tiedy]
496-10, +0, +1
497call setCordance(concordance, discordance, tiedx, tiedy, x, y)
498[concordance, discordance, tiedx, tiedy]
499+40, +50, +0, +1
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'ME', 'OD', 'MO', 'LO', 'PR', 'XZ', 'IR', 'DI', 'RO', 'CW', 'ZV', 'GP', 'UJ', 'MJ', 'SS', 'OP', 'LC', 'FX', 'YC', 'MF'
509y = getUnifRand('AA', 'ZZ', nsam)
510y
511'WS', 'SD', 'AK', 'OB', 'VT', 'NR', 'FI', 'OO', 'EK', 'UN', 'WQ', 'HW', 'PF', 'SE', 'XH', 'CU', 'MC', 'OZ', 'BA', 'KO'
512call setCordance(cordance, tiedx, tiedy, x, y)
513[cordance, tiedx, tiedy]
514+26, +0, +0
515call setCordance(concordance, discordance, tiedx, tiedy, x, y)
516[concordance, discordance, tiedx, tiedy]
517+108, +82, +0, +0
518if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
519
520
521nsam = getUnifRand(0, 20)
522nsam
523+17
524x = getUnifRand('AA', 'ZZ', nsam)
525x
526'FF', 'GT', 'IF', 'LY', 'JH', 'DZ', 'KA', 'NF', 'ZG', 'WT', 'MD', 'TL', 'CW', 'TG', 'IV', 'ZI', 'KV'
527y = getUnifRand('AA', 'ZZ', nsam)
528y
529'NR', 'TW', 'OS', 'GZ', 'UA', 'BP', 'UX', 'YO', 'WN', 'GA', 'RC', 'SV', 'EV', 'PY', 'AG', 'KA', 'OH'
530call setCordance(cordance, tiedx, tiedy, x, y)
531[cordance, tiedx, tiedy]
532+22, +0, +0
533call setCordance(concordance, discordance, tiedx, tiedy, x, y)
534[concordance, discordance, tiedx, tiedy]
535+79, +57, +0, +0
536if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
537
538
539nsam = getUnifRand(0, 20)
540nsam
541+19
542x = getUnifRand('AA', 'ZZ', nsam)
543x
544'ZO', 'VV', 'PA', 'HV', 'TW', 'WZ', 'EY', 'YC', 'QD', 'JF', 'RQ', 'KN', 'PF', 'GH', 'GU', 'WU', 'EI', 'GJ', 'EB'
545y = getUnifRand('AA', 'ZZ', nsam)
546y
547'XC', 'EG', 'IZ', 'NP', 'VJ', 'VI', 'BM', 'TR', 'OE', 'EE', 'VE', 'LO', 'KF', 'RF', 'LW', 'MR', 'ME', 'ZP', 'JY'
548call setCordance(cordance, tiedx, tiedy, x, y)
549[cordance, tiedx, tiedy]
550+7, +0, +0
551call setCordance(concordance, discordance, tiedx, tiedy, x, y)
552[concordance, discordance, tiedx, tiedy]
553+89, +82, +0, +0
554if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
555
556
557nsam = getUnifRand(0, 20)
558nsam
559+10
560x = getUnifRand('AA', 'ZZ', nsam)
561x
562'ET', 'ZH', 'FP', 'RN', 'IA', 'DA', 'CC', 'ON', 'CA', 'UW'
563y = getUnifRand('AA', 'ZZ', nsam)
564y
565'GT', 'ZL', 'MR', 'GW', 'YF', 'DP', 'GM', 'CI', 'YO', 'OI'
566call setCordance(cordance, tiedx, tiedy, x, y)
567[cordance, tiedx, tiedy]
568+5, +0, +0
569call setCordance(concordance, discordance, tiedx, tiedy, x, y)
570[concordance, discordance, tiedx, tiedy]
571+25, +20, +0, +0
572if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
573
574
575nsam = getUnifRand(0, 20)
576nsam
577+20
578x = getUnifRand('AA', 'ZZ', nsam)
579x
580'LF', 'KC', 'GD', 'EP', 'HD', 'PW', 'AL', 'RO', 'XK', 'KS', 'TW', 'IX', 'CU', 'JJ', 'HX', 'SN', 'SF', 'DY', 'IJ', 'WK'
581y = getUnifRand('AA', 'ZZ', nsam)
582y
583'JB', 'AM', 'NO', 'OL', 'FN', 'RD', 'EH', 'QV', 'FT', 'ZZ', 'VJ', 'FJ', 'TW', 'RD', 'DM', 'WQ', 'XO', 'NR', 'EB', 'JL'
584call setCordance(cordance, tiedx, tiedy, x, y)
585[cordance, tiedx, tiedy]
586-27, +0, +1
587call setCordance(concordance, discordance, tiedx, tiedy, x, y)
588[concordance, discordance, tiedx, tiedy]
589+81, +108, +0, +1
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+2, +2
604y = getUnifRand(1, nsam, nsam)
605y
606+2, +2
607call setCordance(cordance, tiedx, tiedy, x, y)
608[cordance, tiedx, tiedy]
609+0, +1, +1
610call setCordance(concordance, discordance, tiedx, tiedy, x, y)
611[concordance, discordance, tiedx, tiedy]
612+0, +0, +1, +1
613if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
614
615
616nsam = getUnifRand(0, 20)
617nsam
618+0
619x = getUnifRand(1, nsam, nsam)
620x
621
622y = getUnifRand(1, nsam, nsam)
623y
624
625call setCordance(cordance, tiedx, tiedy, x, y)
626[cordance, tiedx, tiedy]
627+0, +0, +0
628call setCordance(concordance, discordance, tiedx, tiedy, x, y)
629[concordance, discordance, tiedx, tiedy]
630+0, +0, +0, +0
631if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
632
633
634nsam = getUnifRand(0, 20)
635nsam
636+10
637x = getUnifRand(1, nsam, nsam)
638x
639+5, +6, +9, +2, +6, +5, +5, +3, +1, +10
640y = getUnifRand(1, nsam, nsam)
641y
642+5, +5, +5, +5, +1, +5, +3, +4, +2, +4
643call setCordance(cordance, tiedx, tiedy, x, y)
644[cordance, tiedx, tiedy]
645+15, +4, +11
646call setCordance(concordance, discordance, tiedx, tiedy, x, y)
647[concordance, discordance, tiedx, tiedy]
648+23, +8, +4, +11
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+10, +3, +4, +2, +8, +7, +14, +9, +1, +6, +2, +12, +5, +14
658y = getUnifRand(1, nsam, nsam)
659y
660+8, +7, +10, +3, +14, +7, +1, +10, +3, +5, +9, +10, +9, +11
661call setCordance(cordance, tiedx, tiedy, x, y)
662[cordance, tiedx, tiedy]
663-13, +2, +6
664call setCordance(concordance, discordance, tiedx, tiedy, x, y)
665[concordance, discordance, tiedx, tiedy]
666+35, +48, +2, +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+3, +11, +4, +1, +7, +9, +4, +6, +7, +5, +1
676y = getUnifRand(1, nsam, nsam)
677y
678+5, +9, +6, +2, +8, +4, +3, +7, +10, +3, +1
679call setCordance(cordance, tiedx, tiedy, x, y)
680[cordance, tiedx, tiedy]
681+11, +3, +1
682call setCordance(concordance, discordance, tiedx, tiedy, x, y)
683[concordance, discordance, tiedx, tiedy]
684+31, +20, +3, +1
685if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
686
687
688nsam = getUnifRand(0, 20)
689nsam
690+2
691x = getUnifRand(1, nsam, nsam)
692x
693+2, +1
694y = getUnifRand(1, nsam, nsam)
695y
696+1, +2
697call setCordance(cordance, tiedx, tiedy, x, y)
698[cordance, tiedx, tiedy]
699-1, +0, +0
700call setCordance(concordance, discordance, tiedx, tiedy, x, y)
701[concordance, discordance, tiedx, tiedy]
702+0, +1, +0, +0
703if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
704
705
706nsam = getUnifRand(0, 20)
707nsam
708+14
709x = getUnifRand(1, nsam, nsam)
710x
711+4, +5, +13, +2, +3, +11, +9, +3, +1, +14, +2, +3, +13, +5
712y = getUnifRand(1, nsam, nsam)
713y
714+9, +14, +9, +13, +7, +1, +9, +3, +1, +14, +11, +1, +7, +3
715call setCordance(cordance, tiedx, tiedy, x, y)
716[cordance, tiedx, tiedy]
717+20, +6, +9
718call setCordance(concordance, discordance, tiedx, tiedy, x, y)
719[concordance, discordance, tiedx, tiedy]
720+48, +28, +6, +9
721if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
722
723
724nsam = getUnifRand(0, 20)
725nsam
726+1
727x = getUnifRand(1, nsam, nsam)
728x
729+1
730y = getUnifRand(1, nsam, nsam)
731y
732+1
733call setCordance(cordance, tiedx, tiedy, x, y)
734[cordance, tiedx, tiedy]
735+0, +0, +0
736call setCordance(concordance, discordance, tiedx, tiedy, x, y)
737[concordance, discordance, tiedx, tiedy]
738+0, +0, +0, +0
739if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
740
741
742nsam = getUnifRand(0, 20)
743nsam
744+12
745x = getUnifRand(1, nsam, nsam)
746x
747+10, +5, +1, +5, +7, +6, +9, +1, +6, +11, +6, +3
748y = getUnifRand(1, nsam, nsam)
749y
750+5, +5, +11, +8, +7, +10, +8, +3, +2, +8, +7, +4
751call setCordance(cordance, tiedx, tiedy, x, y)
752[cordance, tiedx, tiedy]
753+12, +5, +5
754call setCordance(concordance, discordance, tiedx, tiedy, x, y)
755[concordance, discordance, tiedx, tiedy]
756+34, +22, +5, +5
757if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
758
759
760nsam = getUnifRand(0, 20)
761nsam
762+17
763x = getUnifRand(1, nsam, nsam)
764x
765+6, +15, +14, +14, +1, +17, +7, +13, +8, +12, +9, +12, +14, +14, +17, +14, +4
766y = getUnifRand(1, nsam, nsam)
767y
768+17, +1, +10, +10, +17, +7, +14, +5, +13, +4, +9, +15, +9, +4, +6, +1, +7
769call setCordance(cordance, tiedx, tiedy, x, y)
770[cordance, tiedx, tiedy]
771+31, +12, +6
772call setCordance(concordance, discordance, tiedx, tiedy, x, y)
773[concordance, discordance, tiedx, tiedy]
774+75, +44, +12, +6
775if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
776
777
778nsam = getUnifRand(0, 20)
779nsam
780+16
781x = getUnifRand(1, nsam, nsam)
782x
783+6, +12, +3, +1, +4, +3, +1, +13, +9, +2, +11, +10, +7, +12, +5, +7
784y = getUnifRand(1, nsam, nsam)
785y
786+7, +5, +16, +16, +5, +14, +12, +11, +16, +5, +7, +15, +1, +2, +14, +2
787call setCordance(cordance, tiedx, tiedy, x, y)
788[cordance, tiedx, tiedy]
789+27, +4, +9
790call setCordance(concordance, discordance, tiedx, tiedy, x, y)
791[concordance, discordance, tiedx, tiedy]
792+67, +40, +4, +9
793if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
794
795
796nsam = getUnifRand(0, 20)
797nsam
798+5
799x = getUnifRand(1, nsam, nsam)
800x
801+1, +5, +1, +2, +4
802y = getUnifRand(1, nsam, nsam)
803y
804+1, +2, +2, +3, +4
805call setCordance(cordance, tiedx, tiedy, x, y)
806[cordance, tiedx, tiedy]
807-8, +1, +1
808call setCordance(concordance, discordance, tiedx, tiedy, x, y)
809[concordance, discordance, tiedx, tiedy]
810+0, +8, +1, +1
811if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
812
813
814nsam = getUnifRand(0, 20)
815nsam
816+9
817x = getUnifRand(1, nsam, nsam)
818x
819+8, +1, +1, +1, +8, +9, +2, +4, +5
820y = getUnifRand(1, nsam, nsam)
821y
822+6, +6, +7, +6, +4, +4, +7, +7, +8
823call setCordance(cordance, tiedx, tiedy, x, y)
824[cordance, tiedx, tiedy]
825-12, +4, +7
826call setCordance(concordance, discordance, tiedx, tiedy, x, y)
827[concordance, discordance, tiedx, tiedy]
828+7, +19, +4, +7
829if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
830
831
832nsam = getUnifRand(0, 20)
833nsam
834+12
835x = getUnifRand(1, nsam, nsam)
836x
837+3, +2, +11, +11, +3, +1, +4, +8, +10, +1, +9, +6
838y = getUnifRand(1, nsam, nsam)
839y
840+9, +4, +2, +4, +11, +7, +8, +2, +5, +8, +11, +6
841call setCordance(cordance, tiedx, tiedy, x, y)
842[cordance, tiedx, tiedy]
843-7, +3, +4
844call setCordance(concordance, discordance, tiedx, tiedy, x, y)
845[concordance, discordance, tiedx, tiedy]
846+26, +33, +3, +4
847if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
848
849
850nsam = getUnifRand(0, 20)
851nsam
852+14
853x = getUnifRand(1, nsam, nsam)
854x
855+14, +5, +9, +7, +11, +1, +3, +14, +10, +6, +10, +14, +3, +14
856y = getUnifRand(1, nsam, nsam)
857y
858+9, +6, +7, +5, +14, +1, +6, +3, +8, +10, +3, +6, +4, +6
859call setCordance(cordance, tiedx, tiedy, x, y)
860[cordance, tiedx, tiedy]
861+11, +8, +7
862call setCordance(concordance, discordance, tiedx, tiedy, x, y)
863[concordance, discordance, tiedx, tiedy]
864+44, +33, +8, +7
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+17
876x = getUnifRand(1, nsam, nsam)
877x
878+10.0000000, +7.00000000, +5.00000000, +11.0000000, +9.00000000, +10.0000000, +11.0000000, +4.00000000, +4.00000000, +2.00000000, +16.0000000, +2.00000000, +10.0000000, +16.0000000, +1.00000000, +2.00000000, +9.00000000
879y = getUnifRand(1, nsam, nsam)
880y
881+7.00000000, +11.0000000, +15.0000000, +6.00000000, +3.00000000, +13.0000000, +2.00000000, +11.0000000, +5.00000000, +3.00000000, +8.00000000, +10.0000000, +13.0000000, +1.00000000, +13.0000000, +11.0000000, +6.00000000
882call setCordance(cordance, tiedx, tiedy, x, y)
883[cordance, tiedx, tiedy]
884+7, +10, +8
885call setCordance(concordance, discordance, tiedx, tiedy, x, y)
886[concordance, discordance, tiedx, tiedy]
887+63, +56, +10, +8
888if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
889
890
891nsam = getUnifRand(0, 20)
892nsam
893+3
894x = getUnifRand(1, nsam, nsam)
895x
896+3.00000000, +2.00000000, +1.00000000
897y = getUnifRand(1, nsam, nsam)
898y
899+3.00000000, +2.00000000, +1.00000000
900call setCordance(cordance, tiedx, tiedy, x, y)
901[cordance, tiedx, tiedy]
902+3, +0, +0
903call setCordance(concordance, discordance, tiedx, tiedy, x, y)
904[concordance, discordance, tiedx, tiedy]
905+3, +0, +0, +0
906if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
907
908
909nsam = getUnifRand(0, 20)
910nsam
911+14
912x = getUnifRand(1, nsam, nsam)
913x
914+7.00000000, +12.0000000, +5.00000000, +10.0000000, +14.0000000, +9.00000000, +3.00000000, +7.00000000, +4.00000000, +11.0000000, +14.0000000, +1.00000000, +6.00000000, +9.00000000
915y = getUnifRand(1, nsam, nsam)
916y
917+6.00000000, +8.00000000, +14.0000000, +11.0000000, +13.0000000, +1.00000000, +5.00000000, +13.0000000, +6.00000000, +8.00000000, +12.0000000, +8.00000000, +14.0000000, +4.00000000
918call setCordance(cordance, tiedx, tiedy, x, y)
919[cordance, tiedx, tiedy]
920+0, +3, +6
921call setCordance(concordance, discordance, tiedx, tiedy, x, y)
922[concordance, discordance, tiedx, tiedy]
923+41, +41, +3, +6
924if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
925
926
927nsam = getUnifRand(0, 20)
928nsam
929+17
930x = getUnifRand(1, nsam, nsam)
931x
932+11.0000000, +12.0000000, +10.0000000, +2.00000000, +17.0000000, +11.0000000, +14.0000000, +15.0000000, +15.0000000, +12.0000000, +7.00000000, +13.0000000, +8.00000000, +10.0000000, +2.00000000, +9.00000000, +17.0000000
933y = getUnifRand(1, nsam, nsam)
934y
935+15.0000000, +10.0000000, +3.00000000, +7.00000000, +1.00000000, +10.0000000, +3.00000000, +16.0000000, +17.0000000, +6.00000000, +13.0000000, +10.0000000, +7.00000000, +16.0000000, +15.0000000, +15.0000000, +10.0000000
936call setCordance(cordance, tiedx, tiedy, x, y)
937[cordance, tiedx, tiedy]
938-26, +6, +12
939call setCordance(concordance, discordance, tiedx, tiedy, x, y)
940[concordance, discordance, tiedx, tiedy]
941+46, +72, +6, +12
942if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
943
944
945nsam = getUnifRand(0, 20)
946nsam
947+19
948x = getUnifRand(1, nsam, nsam)
949x
950+2.00000000, +5.00000000, +2.00000000, +4.00000000, +5.00000000, +2.00000000, +8.00000000, +1.00000000, +13.0000000, +10.0000000, +17.0000000, +14.0000000, +17.0000000, +9.00000000, +10.0000000, +7.00000000, +13.0000000, +17.0000000, +16.0000000
951y = getUnifRand(1, nsam, nsam)
952y
953+17.0000000, +10.0000000, +9.00000000, +17.0000000, +14.0000000, +12.0000000, +19.0000000, +10.0000000, +9.00000000, +6.00000000, +3.00000000, +5.00000000, +11.0000000, +18.0000000, +5.00000000, +13.0000000, +17.0000000, +5.00000000, +12.0000000
954call setCordance(cordance, tiedx, tiedy, x, y)
955[cordance, tiedx, tiedy]
956+29, +9, +9
957call setCordance(concordance, discordance, tiedx, tiedy, x, y)
958[concordance, discordance, tiedx, tiedy]
959+91, +62, +9, +9
960if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
961
962
963nsam = getUnifRand(0, 20)
964nsam
965+0
966x = getUnifRand(1, nsam, nsam)
967x
968
969y = getUnifRand(1, nsam, nsam)
970y
971
972call setCordance(cordance, tiedx, tiedy, x, y)
973[cordance, tiedx, tiedy]
974+0, +0, +0
975call setCordance(concordance, discordance, tiedx, tiedy, x, y)
976[concordance, discordance, tiedx, tiedy]
977+0, +0, +0, +0
978if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
979
980
981nsam = getUnifRand(0, 20)
982nsam
983+13
984x = getUnifRand(1, nsam, nsam)
985x
986+9.00000000, +1.00000000, +9.00000000, +4.00000000, +7.00000000, +12.0000000, +4.00000000, +4.00000000, +1.00000000, +5.00000000, +2.00000000, +12.0000000, +9.00000000
987y = getUnifRand(1, nsam, nsam)
988y
989+8.00000000, +2.00000000, +3.00000000, +13.0000000, +9.00000000, +13.0000000, +10.0000000, +11.0000000, +9.00000000, +4.00000000, +13.0000000, +7.00000000, +5.00000000
990call setCordance(cordance, tiedx, tiedy, x, y)
991[cordance, tiedx, tiedy]
992-6, +8, +4
993call setCordance(concordance, discordance, tiedx, tiedy, x, y)
994[concordance, discordance, tiedx, tiedy]
995+30, +36, +8, +4
996if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
997
998
999nsam = getUnifRand(0, 20)
1000nsam
1001+9
1002x = getUnifRand(1, nsam, nsam)
1003x
1004+4.00000000, +9.00000000, +8.00000000, +4.00000000, +2.00000000, +5.00000000, +4.00000000, +2.00000000, +5.00000000
1005y = getUnifRand(1, nsam, nsam)
1006y
1007+6.00000000, +9.00000000, +6.00000000, +1.00000000, +3.00000000, +2.00000000, +1.00000000, +1.00000000, +8.00000000
1008call setCordance(cordance, tiedx, tiedy, x, y)
1009[cordance, tiedx, tiedy]
1010+10, +5, +4
1011call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1012[concordance, discordance, tiedx, tiedy]
1013+19, +9, +5, +4
1014if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1015
1016
1017nsam = getUnifRand(0, 20)
1018nsam
1019+10
1020x = getUnifRand(1, nsam, nsam)
1021x
1022+9.00000000, +5.00000000, +2.00000000, +9.00000000, +1.00000000, +9.00000000, +8.00000000, +1.00000000, +3.00000000, +9.00000000
1023y = getUnifRand(1, nsam, nsam)
1024y
1025+2.00000000, +1.00000000, +10.0000000, +8.00000000, +10.0000000, +5.00000000, +8.00000000, +4.00000000, +2.00000000, +9.00000000
1026call setCordance(cordance, tiedx, tiedy, x, y)
1027[cordance, tiedx, tiedy]
1028+1, +7, +3
1029call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1030[concordance, discordance, tiedx, tiedy]
1031+18, +17, +7, +3
1032if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1033
1034
1035nsam = getUnifRand(0, 20)
1036nsam
1037+9
1038x = getUnifRand(1, nsam, nsam)
1039x
1040+3.00000000, +2.00000000, +2.00000000, +6.00000000, +7.00000000, +7.00000000, +7.00000000, +8.00000000, +8.00000000
1041y = getUnifRand(1, nsam, nsam)
1042y
1043+8.00000000, +7.00000000, +9.00000000, +7.00000000, +7.00000000, +4.00000000, +4.00000000, +4.00000000, +1.00000000
1044call setCordance(cordance, tiedx, tiedy, x, y)
1045[cordance, tiedx, tiedy]
1046+24, +5, +6
1047call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1048[concordance, discordance, tiedx, tiedy]
1049+25, +1, +5, +6
1050if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1051
1052
1053nsam = getUnifRand(0, 20)
1054nsam
1055+20
1056x = getUnifRand(1, nsam, nsam)
1057x
1058+18.0000000, +15.0000000, +13.0000000, +19.0000000, +7.00000000, +10.0000000, +9.00000000, +8.00000000, +2.00000000, +20.0000000, +4.00000000, +1.00000000, +5.00000000, +16.0000000, +10.0000000, +7.00000000, +12.0000000, +8.00000000, +18.0000000, +3.00000000
1059y = getUnifRand(1, nsam, nsam)
1060y
1061+10.0000000, +15.0000000, +5.00000000, +10.0000000, +11.0000000, +1.00000000, +11.0000000, +12.0000000, +3.00000000, +17.0000000, +16.0000000, +7.00000000, +9.00000000, +3.00000000, +7.00000000, +1.00000000, +15.0000000, +8.00000000, +9.00000000, +1.00000000
1062call setCordance(cordance, tiedx, tiedy, x, y)
1063[cordance, tiedx, tiedy]
1064+31, +4, +9
1065call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1066[concordance, discordance, tiedx, tiedy]
1067+104, +73, +4, +9
1068if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1069
1070
1071nsam = getUnifRand(0, 20)
1072nsam
1073+2
1074x = getUnifRand(1, nsam, nsam)
1075x
1076+2.00000000, +2.00000000
1077y = getUnifRand(1, nsam, nsam)
1078y
1079+1.00000000, +2.00000000
1080call setCordance(cordance, tiedx, tiedy, x, y)
1081[cordance, tiedx, tiedy]
1082+0, +1, +0
1083call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1084[concordance, discordance, tiedx, tiedy]
1085+0, +0, +1, +0
1086if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1087
1088
1089nsam = getUnifRand(0, 20)
1090nsam
1091+19
1092x = getUnifRand(1, nsam, nsam)
1093x
1094+7.00000000, +7.00000000, +12.0000000, +13.0000000, +16.0000000, +1.00000000, +10.0000000, +13.0000000, +6.00000000, +4.00000000, +9.00000000, +6.00000000, +2.00000000, +12.0000000, +2.00000000, +17.0000000, +18.0000000, +14.0000000, +13.0000000
1095y = getUnifRand(1, nsam, nsam)
1096y
1097+13.0000000, +1.00000000, +9.00000000, +16.0000000, +8.00000000, +5.00000000, +12.0000000, +16.0000000, +6.00000000, +5.00000000, +8.00000000, +9.00000000, +13.0000000, +3.00000000, +14.0000000, +18.0000000, +9.00000000, +11.0000000, +10.0000000
1098call setCordance(cordance, tiedx, tiedy, x, y)
1099[cordance, tiedx, tiedy]
1100-24, +7, +7
1101call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1102[concordance, discordance, tiedx, tiedy]
1103+67, +91, +7, +7
1104if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1105
1106
1107nsam = getUnifRand(0, 20)
1108nsam
1109+15
1110x = getUnifRand(1, nsam, nsam)
1111x
1112+6.00000000, +11.0000000, +4.00000000, +2.00000000, +11.0000000, +15.0000000, +15.0000000, +6.00000000, +12.0000000, +5.00000000, +1.00000000, +11.0000000, +8.00000000, +11.0000000, +11.0000000
1113y = getUnifRand(1, nsam, nsam)
1114y
1115+10.0000000, +6.00000000, +6.00000000, +9.00000000, +1.00000000, +5.00000000, +7.00000000, +5.00000000, +3.00000000, +7.00000000, +11.0000000, +1.00000000, +11.0000000, +4.00000000, +1.00000000
1116call setCordance(cordance, tiedx, tiedy, x, y)
1117[cordance, tiedx, tiedy]
1118+17, +12, +7
1119call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1120[concordance, discordance, tiedx, tiedy]
1121+53, +36, +12, +7
1122if (concordance - discordance /= cordance) error stop 'Internal library error detected. This never happens.'
1123
1124
1125nsam = getUnifRand(0, 20)
1126nsam
1127+3
1128x = getUnifRand(1, nsam, nsam)
1129x
1130+1.00000000, +2.00000000, +2.00000000
1131y = getUnifRand(1, nsam, nsam)
1132y
1133+1.00000000, +3.00000000, +2.00000000
1134call setCordance(cordance, tiedx, tiedy, x, y)
1135[cordance, tiedx, tiedy]
1136-2, +1, +0
1137call setCordance(concordance, discordance, tiedx, tiedy, x, y)
1138[concordance, discordance, tiedx, tiedy]
1139+0, +2, +1, +0
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: